Harden provider and subtitles API paths for normalization work #3433
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: CI | |
| # Touch this file to keep GitHub Actions registered on the default branch. | |
| on: | |
| push: | |
| branches: [development] | |
| paths: | |
| - "bazarr.py" | |
| - "bazarr/**" | |
| - "custom_libs/**" | |
| - "frontend/**" | |
| - "libs/**" | |
| - "migrations/**" | |
| - "tests/**" | |
| - "dev-requirements.txt" | |
| - "pytest.ini" | |
| - "requirements.txt" | |
| - ".github/scripts/**" | |
| - ".github/workflows/ci.yml" | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| ROOT_DIRECTORY: . | |
| UI_DIRECTORY: ./frontend | |
| SCRIPTS_DIRECTORY: .github/scripts | |
| UI_ARTIFACT_NAME: ui | |
| PYTHON_VERSION: "3.13" | |
| HUSKY: "0" | |
| PIP_DISABLE_PIP_VERSION_CHECK: "1" | |
| jobs: | |
| frontend: | |
| name: Frontend | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd | |
| with: | |
| persist-credentials: false | |
| - name: Setup NodeJS | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e | |
| with: | |
| node-version-file: "${{ env.UI_DIRECTORY }}/.nvmrc" | |
| cache: npm | |
| cache-dependency-path: "${{ env.UI_DIRECTORY }}/package-lock.json" | |
| - name: Install dependencies | |
| run: npm ci | |
| working-directory: ${{ env.UI_DIRECTORY }} | |
| - name: Check types | |
| run: npm run check:ts | |
| working-directory: ${{ env.UI_DIRECTORY }} | |
| - name: Lint | |
| run: npm run check | |
| working-directory: ${{ env.UI_DIRECTORY }} | |
| - name: Check format | |
| run: npm run check:fmt | |
| working-directory: ${{ env.UI_DIRECTORY }} | |
| - name: Test | |
| run: npm test -- --run | |
| working-directory: ${{ env.UI_DIRECTORY }} | |
| - name: Build | |
| run: npm run build:ci | |
| working-directory: ${{ env.UI_DIRECTORY }} | |
| - name: Upload UI build | |
| uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 | |
| with: | |
| name: ${{ env.UI_ARTIFACT_NAME }} | |
| path: "${{ env.UI_DIRECTORY }}/build" | |
| if-no-files-found: error | |
| retention-days: 1 | |
| backend-tests: | |
| name: Backend tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python ${{ env.PYTHON_VERSION }} | |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| cache: pip | |
| cache-dependency-path: | | |
| requirements.txt | |
| dev-requirements.txt | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip setuptools wheel | |
| python -m pip install -r requirements.txt -r dev-requirements.txt | |
| - name: Compile Python | |
| run: PYTHONWARNINGS=ignore::SyntaxWarning python -m compileall -q bazarr custom_libs libs tests | |
| - name: Test focused backend coverage | |
| run: > | |
| python -m pytest | |
| tests/bazarr/test_wanted_search_fixtures.py | |
| tests/bazarr/test_sync_performance_paths.py | |
| -q | |
| python-compat: | |
| name: Python ${{ matrix.python-version }} compatibility | |
| if: github.event_name != 'pull_request' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| cache-dependency-path: | | |
| requirements.txt | |
| dev-requirements.txt | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip setuptools wheel | |
| python -m pip install -r requirements.txt -r dev-requirements.txt | |
| - name: Compile Python | |
| run: PYTHONWARNINGS=ignore::SyntaxWarning python -m compileall -q bazarr custom_libs libs tests | |
| - name: Test focused backend coverage | |
| run: > | |
| python -m pytest | |
| tests/bazarr/test_wanted_search_fixtures.py | |
| tests/bazarr/test_sync_performance_paths.py | |
| -q | |
| smoke: | |
| name: App smoke test | |
| runs-on: ubuntu-latest | |
| needs: [frontend, backend-tests] | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python ${{ env.PYTHON_VERSION }} | |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| cache: pip | |
| cache-dependency-path: | | |
| requirements.txt | |
| dev-requirements.txt | |
| - name: Download UI build | |
| uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 | |
| with: | |
| name: ${{ env.UI_ARTIFACT_NAME }} | |
| path: "${{ env.UI_DIRECTORY }}/build" | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip setuptools wheel | |
| python -m pip install -r requirements.txt -r dev-requirements.txt | |
| - name: Start app and check UI | |
| run: bash '${{ env.SCRIPTS_DIRECTORY }}/build_test.sh' |