feat: Add GET/POST /task/list endpoint #416
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: Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| paths: | |
| - 'src/**' | |
| - 'tests/**' | |
| - 'docker/**' | |
| - 'docker-compose.yaml' | |
| - 'pyproject.toml' | |
| - '.github/workflows/tests.yml' | |
| permissions: | |
| contents: write | |
| jobs: | |
| tests: | |
| name: "${{ matrix.php_api == true && 'Migration' || 'Python-only' }} ${{ matrix.mutations == true && 'with mutations' || 'read-only' }}" | |
| strategy: | |
| matrix: | |
| php_api: [true, false] | |
| mutations: [true, false] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: 3.x | |
| # https://github.com/docker/compose/issues/10596 | |
| - name: Start services | |
| run: | | |
| services="python-api" | |
| if [ "${{ matrix.php_api }}" = "true" ]; then | |
| services="$services php-api" | |
| fi | |
| docker compose up $services --detach --wait --remove-orphans || exit $(docker compose ps -q | xargs docker inspect -f '{{.State.ExitCode}}' | grep -v '^0' | wc -l) | |
| - name: Run tests | |
| run: | | |
| marker="${{ matrix.php_api == true && 'php_api' || 'not php_api' }} and ${{ matrix.mutations == true && 'mut' || 'not mut' }}" | |
| jobs="${{ matrix.mutations == true && '1' || 'auto' }}" | |
| docker compose exec python-api coverage run -m pytest -n "$jobs" -v -m "$marker" | |
| - name: Produce coverage report | |
| run: docker compose exec python-api coverage xml | |
| - name: Upload results to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} |