preflight: scaffold + context files
This commit is contained in:
BIN
interview-agent/.github/assets/livekit-mark.png
vendored
Normal file
BIN
interview-agent/.github/assets/livekit-mark.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 832 B |
33
interview-agent/.github/workflows/ruff.yml
vendored
Normal file
33
interview-agent/.github/workflows/ruff.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
name: Ruff
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
ruff-check:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@v1
|
||||
with:
|
||||
version: "latest"
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.12"
|
||||
|
||||
- name: Install dependencies
|
||||
run: UV_GIT_LFS=1 uv sync --dev
|
||||
|
||||
- name: Run ruff linter
|
||||
run: uv run ruff check --output-format=github .
|
||||
|
||||
- name: Run ruff formatter
|
||||
run: uv run ruff format --check --diff .
|
||||
77
interview-agent/.github/workflows/tag-version.yml
vendored
Normal file
77
interview-agent/.github/workflows/tag-version.yml
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
name: Tag livekit-agents version
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'pyproject.toml'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
tag-version:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 2
|
||||
fetch-tags: true
|
||||
|
||||
- name: Detect livekit-agents version change
|
||||
id: version
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
extract_version() {
|
||||
local ref="$1"
|
||||
git show "$ref:pyproject.toml" 2>/dev/null \
|
||||
| grep -oE '"livekit-agents(\[[^]]*\])?==[^"]+"' \
|
||||
| head -n1 \
|
||||
| sed -E 's/.*==([^"]+)"/\1/' \
|
||||
|| true
|
||||
}
|
||||
|
||||
current=$(extract_version HEAD)
|
||||
previous=$(extract_version HEAD^ || true)
|
||||
|
||||
echo "current=$current"
|
||||
echo "previous=$previous"
|
||||
|
||||
if [ -z "$current" ]; then
|
||||
echo "No livekit-agents==X.Y.Z pin found in pyproject.toml; skipping."
|
||||
echo "should_tag=false" >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$current" = "$previous" ]; then
|
||||
echo "livekit-agents version unchanged ($current); skipping."
|
||||
echo "should_tag=false" >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "livekit-agents bumped: ${previous:-<none>} -> $current"
|
||||
echo "should_tag=true" >> "$GITHUB_OUTPUT"
|
||||
echo "version=$current" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Create and push tag
|
||||
if: steps.version.outputs.should_tag == 'true'
|
||||
run: |
|
||||
set -euo pipefail
|
||||
tag="v${{ steps.version.outputs.version }}"
|
||||
|
||||
if git rev-parse --verify "refs/tags/$tag" >/dev/null 2>&1; then
|
||||
existing=$(git rev-list -n1 "$tag")
|
||||
if [ "$existing" = "$GITHUB_SHA" ]; then
|
||||
echo "Tag $tag already points at $GITHUB_SHA; nothing to do."
|
||||
exit 0
|
||||
fi
|
||||
echo "Error: tag $tag already exists on a different commit ($existing)."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git tag -a "$tag" -m "livekit-agents $tag"
|
||||
git push origin "$tag"
|
||||
31
interview-agent/.github/workflows/template-check.yml
vendored
Normal file
31
interview-agent/.github/workflows/template-check.yml
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
# As this is a starter template project, we don't want to check in the uv.lock and livekit.toml files in its template form
|
||||
# However, once you have cloned this repo for your own use, LiveKit recommends you check them in and delete this github workflow entirely
|
||||
|
||||
name: Template Check
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
check-template-files:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Check template files not tracked in git
|
||||
run: |
|
||||
if git ls-files | grep -q "^uv\.lock$"; then
|
||||
echo "Error: uv.lock should not be checked into git"
|
||||
echo "Disable this test and commit the file once you have cloned this repo for your own use"
|
||||
exit 1
|
||||
fi
|
||||
if git ls-files | grep -q "^livekit\.toml$"; then
|
||||
echo "Error: livekit.toml should not be checked into git"
|
||||
echo "Disable this test and commit the file once you have cloned this repo for your own use"
|
||||
exit 1
|
||||
fi
|
||||
echo "✓ uv.lock and livekit.toml are correctly not tracked in git"
|
||||
34
interview-agent/.github/workflows/tests.yml
vendored
Normal file
34
interview-agent/.github/workflows/tests.yml
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
name: Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@v1
|
||||
with:
|
||||
version: "latest"
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.14"
|
||||
|
||||
- name: Install dependencies
|
||||
run: UV_GIT_LFS=1 uv sync --dev
|
||||
|
||||
- name: Run tests
|
||||
env:
|
||||
LIVEKIT_URL: ${{ secrets.LIVEKIT_URL }}
|
||||
LIVEKIT_API_KEY: ${{ secrets.LIVEKIT_API_KEY }}
|
||||
LIVEKIT_API_SECRET: ${{ secrets.LIVEKIT_API_SECRET }}
|
||||
run: uv run pytest -v
|
||||
Reference in New Issue
Block a user