|
| 1 | +# Depot CI Migration |
| 2 | +# Source: .github/workflows/api-pull-request.yml |
| 3 | +# |
| 4 | +# No changes were necessary. |
| 5 | + |
| 6 | +name: API Pull Request |
| 7 | +permissions: |
| 8 | + contents: read # For actions/checkout |
| 9 | + id-token: write # For Codecov OIDC |
| 10 | +on: |
| 11 | + pull_request: |
| 12 | + paths: |
| 13 | + - api/** |
| 14 | + - docker/api/** |
| 15 | + - .depot/** |
| 16 | + - .release-please-manifest.json |
| 17 | + types: [opened, synchronize, reopened, ready_for_review] |
| 18 | + push: |
| 19 | + paths: |
| 20 | + - api/** |
| 21 | + - docker/api/** |
| 22 | + - .depot/** |
| 23 | + - .release-please-manifest.json |
| 24 | + branches: |
| 25 | + - main |
| 26 | +defaults: |
| 27 | + run: |
| 28 | + working-directory: api |
| 29 | +env: |
| 30 | + DOTENV_OVERRIDE_FILE: .env-ci |
| 31 | +jobs: |
| 32 | + test: |
| 33 | + runs-on: depot-ubuntu-latest-16 |
| 34 | + name: API Unit Tests |
| 35 | + strategy: |
| 36 | + max-parallel: 3 |
| 37 | + matrix: |
| 38 | + python-version: ["3.11", "3.12", "3.13"] |
| 39 | + steps: |
| 40 | + - name: Cloning repo |
| 41 | + uses: actions/checkout@v5 |
| 42 | + - name: Install Poetry |
| 43 | + run: make install-poetry |
| 44 | + - uses: actions/setup-python@v5 |
| 45 | + with: |
| 46 | + python-version: ${{ matrix.python-version }} |
| 47 | + cache: poetry |
| 48 | + - name: Install Dependencies |
| 49 | + run: make install-packages |
| 50 | + - name: Check for missing migrations |
| 51 | + env: |
| 52 | + opts: --no-input --dry-run --check |
| 53 | + run: make django-make-migrations |
| 54 | + - uses: liskin/gh-problem-matcher-wrap@v2 |
| 55 | + with: |
| 56 | + action: add |
| 57 | + linters: mypy |
| 58 | + - name: Check for new typing errors |
| 59 | + run: make typecheck |
| 60 | + - uses: liskin/gh-problem-matcher-wrap@v2 |
| 61 | + with: |
| 62 | + action: remove |
| 63 | + linters: mypy |
| 64 | + - name: Check autogenerated documentation |
| 65 | + uses: nickcharlton/diff-check@v1.0.0 |
| 66 | + with: |
| 67 | + command: make -C api generate-docs |
| 68 | + - name: Run Tests |
| 69 | + run: make test |
| 70 | + - name: Upload Coverage |
| 71 | + uses: codecov/codecov-action@v5 |
| 72 | + env: |
| 73 | + PYTHON: ${{ matrix.python-version }} |
| 74 | + with: |
| 75 | + env_vars: PYTHON |
| 76 | + use_oidc: true |
0 commit comments