Skip to content

Release v0.27.0 (#80) #446

Release v0.27.0 (#80)

Release v0.27.0 (#80) #446

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:
fail-fast: false
matrix:
python-version: &python-versions ["3.10", "3.11", "3.12", "3.13", "3.14"]
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: |
if [ "${{ matrix.python-version }}" = "3.10" ]; then
uv sync --locked --all-extras
else
uv sync --locked --all-extras --all-packages
fi
- name: Type check
run: |
if [ "${{ matrix.python-version }}" = "3.10" ]; then
uv run pyright fishjam
else
uv run pyright
fi
test:
runs-on: ubuntu-latest
needs: [lint-and-format]
strategy:
fail-fast: false
max-parallel: 1
matrix:
python-version: *python-versions
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: |
if [ "${{ matrix.python-version }}" = "3.10" ]; then
uv sync --locked --all-extras
else
uv sync --locked --all-extras --all-packages
fi
- name: Initialize InstaTunnel
id: tunnel
run: |
npm install -g instatunnel
nohup instatunnel 5000 > tunnel.log 2>&1 &
TIMEOUT=60
ELAPSED=0
echo "Waiting for InstaTunnel to generate URL..."
while ! grep -qE 'https://[^ ]+\.instatunnel\.my' tunnel.log; do
if [ $ELAPSED -ge $TIMEOUT ]; then
echo "Error: InstaTunnel timed out after ${TIMEOUT}s"
cat tunnel.log
exit 1
fi
sleep 1
ELAPSED=$((ELAPSED + 1))
done
TUNNEL_URL=$(grep -oE 'https://[^ ]+\.instatunnel\.my' tunnel.log | head -n 1)
echo "url=$TUNNEL_URL" >> $GITHUB_OUTPUT
echo "InstaTunnel is live at: $TUNNEL_URL"
- name: Upload InstaTunnel log
if: always()
uses: actions/upload-artifact@v4
with:
name: instatunnel-log-py${{ matrix.python-version }}
path: tunnel.log
- 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 }}