Skip to content

FCE-2750 Agent image capture (#70) #391

FCE-2750 Agent image capture (#70)

FCE-2750 Agent image capture (#70) #391

Workflow file for this run

name: CI
on: [push]
jobs:
lint-and-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- name: Install project dependencies
run: uv sync --locked --all-extras --all-packages
- name: Format Check
run: uv run format_check
- name: Lint
run: uv run lint
type-check:
runs-on: ubuntu-latest
strategy: &strategy
matrix:
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
- name: Install project dependencies
run: uv sync --locked --all-extras --all-packages
- name: Type check
run: uv run pyright
test:
runs-on: ubuntu-latest
needs: [lint-and-format]
strategy: *strategy
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
- name: Install project dependencies
run: uv sync --locked --all-extras --all-packages
- name: Initialize Localtunnel
id: tunnel
run: |
npx localtunnel --port 5000 > tunnel.log 2>&1 &
# Poll for the URL
TIMEOUT=10
ELAPSED=0
echo "Waiting for localtunnel to generate URL..."
while ! grep -q "https://" tunnel.log; do
if [ $ELAPSED -ge $TIMEOUT ]; then
echo "Error: Localtunnel timed out after ${TIMEOUT}s"
cat tunnel.log
exit 1
fi
sleep 1
ELAPSED=$((ELAPSED + 1))
done
TUNNEL_URL=$(grep -o 'https://[^ ]*' tunnel.log | head -n 1)
echo "url=$TUNNEL_URL" >> $GITHUB_OUTPUT
echo "Localtunnel is live at: $TUNNEL_URL"
- name: Run tests
run: uv run pytest
env:
WEBHOOK_SERVER_URL: ${{ steps.tunnel.outputs.url }}
FISHJAM_ID: ${{ secrets.CI_FISHJAM_ID }}
FISHJAM_MANAGEMENT_TOKEN: ${{ secrets.CI_FISHJAM_MANAGEMENT_TOKEN }}