Include parent show names in episode history #1009
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: App Tests | |
| on: | |
| pull_request: | |
| paths-ignore: | |
| - ".github/workflows/**" | |
| - "**/*.md" | |
| - "docs/**" | |
| push: | |
| branches: | |
| - latest | |
| - release | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| jobs: | |
| check-workflow-changes: | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - name: Check for workflow modifications | |
| uses: dorny/paths-filter@v4 | |
| id: changes | |
| with: | |
| filters: | | |
| workflows: | |
| - '.github/workflows/**' | |
| - name: Fail if workflows were modified | |
| if: steps.changes.outputs.workflows == 'true' | |
| run: | | |
| echo "::error::Workflow files were modified in this PR." | |
| exit 1 | |
| test: | |
| needs: check-workflow-changes | |
| if: always() | |
| runs-on: ubuntu-latest | |
| strategy: | |
| max-parallel: 4 | |
| matrix: | |
| python-version: ["3.12"] | |
| steps: | |
| - name: Check workflow verification result | |
| if: | | |
| github.event_name == 'pull_request_target' && | |
| needs.check-workflow-changes.result == 'failure' | |
| run: exit 1 | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0 | |
| with: | |
| version: "0.12.3" | |
| - name: Install dependencies | |
| run: | | |
| uv sync --locked --no-default-groups --group test | |
| uv run --no-sync playwright install | |
| - name: Set environment variables from secrets | |
| run: | | |
| if [ -n "${{ secrets.SECRET }}" ]; then echo "SECRET=${{ secrets.SECRET }}" >> $GITHUB_ENV; fi | |
| # Pull requests from forks cannot read repository secrets, so this | |
| # expands to empty for them and Django then refuses to start. SECRET is | |
| # the only variable settings.py treats as mandatory, so fall back to an | |
| # ephemeral one: nothing signed during a test run outlives the job. | |
| if [ -z "${{ secrets.SECRET }}" ]; then | |
| echo "SECRET=$(uv run --no-sync python -c 'import secrets; print(secrets.token_urlsafe(50))')" >> $GITHUB_ENV | |
| fi | |
| if [ -n "${{ secrets.TMDB_API }}" ]; then echo "TMDB_API=${{ secrets.TMDB_API }}" >> $GITHUB_ENV; fi | |
| if [ -n "${{ secrets.MAL_API }}" ]; then echo "MAL_API=${{ secrets.MAL_API }}" >> $GITHUB_ENV; fi | |
| if [ -n "${{ secrets.IGDB_ID }}" ]; then echo "IGDB_ID=${{ secrets.IGDB_ID }}" >> $GITHUB_ENV; fi | |
| if [ -n "${{ secrets.IGDB_SECRET }}" ]; then echo "IGDB_SECRET=${{ secrets.IGDB_SECRET }}" >> $GITHUB_ENV; fi | |
| if [ -n "${{ secrets.HARDCOVER_API }}" ]; then echo "HARDCOVER_API=${{ secrets.HARDCOVER_API }}" >> $GITHUB_ENV; fi | |
| if [ -n "${{ secrets.COMICVINE_API }}" ]; then echo "COMICVINE_API=${{ secrets.COMICVINE_API }}" >> $GITHUB_ENV; fi | |
| - name: Run Tests | |
| run: | | |
| # Tests tagged "network" call live provider APIs. They are slow and | |
| # flaky, and a pull request from a fork cannot read repository secrets, | |
| # so they fail there regardless of the change. Run them deliberately | |
| # with scripts/test.sh --network. | |
| # | |
| # Keep this app list the same as APPS in scripts/test.sh. The runner | |
| # names apps rather than discovering them, so an app that is missing | |
| # here has no test on a pull request while it still passes locally. | |
| # "config" holds the settings, the startup integrity check and the | |
| # recovery page; "api" holds the endpoint and contract suites. | |
| uv run --no-sync coverage run src/manage.py test \ | |
| app users integrations lists events api config \ | |
| --parallel --exclude-tag network | |
| - name: Build Coverage Report | |
| run: | | |
| uv run --no-sync coverage combine | |
| uv run --no-sync coverage report | |
| uv run --no-sync coverage xml | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v6 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} |