Fix CI not running on branches with slashes in their names #120
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test | |
| on: | |
| push: | |
| branches: ["**"] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| max-parallel: 4 | |
| matrix: | |
| python-version: ["3.13", "3.14"] | |
| services: | |
| postgres: | |
| image: postgres:17.4-alpine | |
| env: | |
| POSTGRES_DB: app | |
| POSTGRES_USER: steady_queue | |
| POSTGRES_PASSWORD: steady_queue | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd "pg_isready -U steady_queue -d postgres" | |
| --health-interval 5s | |
| --health-timeout 5s | |
| --health-retries 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install UV | |
| run: | | |
| python -m pip install uv==0.10.2 | |
| - name: Install dependencies | |
| run: | | |
| uv sync | |
| - name: Create queue database | |
| run: | | |
| PGPASSWORD=steady_queue psql -h localhost -U steady_queue -d postgres -c "CREATE DATABASE queue OWNER steady_queue" | |
| - name: Run tests | |
| run: | | |
| uv run coverage run runtests.py | |
| - name: Report coverage | |
| run: | | |
| uv run coverage report --show-missing --skip-covered --include 'steady_queue/**' | |
| stress-test: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:17.4-alpine | |
| env: | |
| POSTGRES_DB: app | |
| POSTGRES_USER: steady_queue | |
| POSTGRES_PASSWORD: steady_queue | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd "pg_isready -U steady_queue -d postgres" | |
| --health-interval 5s | |
| --health-timeout 5s | |
| --health-retries 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: "3.14" | |
| - name: Install UV | |
| run: | | |
| python -m pip install uv==0.10.2 | |
| - name: Install dependencies | |
| run: | | |
| uv sync | |
| - name: Create queue database | |
| run: | | |
| PGPASSWORD=steady_queue psql -h localhost -U steady_queue -d postgres -c "CREATE DATABASE queue OWNER steady_queue" | |
| - name: Run stress test (smoke) | |
| run: | | |
| uv run python tests/stress_test.py --tasks 10 --workload light --timeout 60 |