|
18 | 18 | CI: true |
19 | 19 |
|
20 | 20 | jobs: |
21 | | - pre-commit-checks: |
22 | | - runs-on: ubuntu-latest |
23 | | - steps: |
24 | | - - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 |
25 | | - - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 |
26 | | - with: |
27 | | - python-version: 3.13 |
28 | | - - name: Cache Pre-Commit Hooks |
29 | | - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 |
30 | | - with: |
31 | | - path: ~/.cache/pre-commit |
32 | | - key: pre-commit-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.pre-commit-config.yaml') }} |
33 | | - - name: Setup pre-commit |
34 | | - run: pip install pre-commit |
35 | | - - name: Run pre-commit hooks |
36 | | - run: pre-commit run --all-files --show-diff-on-failure |
37 | | - |
38 | 21 | setup-node: |
39 | 22 | if: github.event.pull_request.draft != true |
40 | 23 | runs-on: ubuntu-latest |
|
61 | 44 | run: pnpm install --frozen-lockfile |
62 | 45 | working-directory: ./dashboard |
63 | 46 |
|
| 47 | + pre-commit-checks: |
| 48 | + runs-on: ubuntu-latest |
| 49 | + needs: setup-node |
| 50 | + timeout-minutes: 10 |
| 51 | + steps: |
| 52 | + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 |
| 53 | + - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 |
| 54 | + with: |
| 55 | + python-version: 3.12 |
| 56 | + |
| 57 | + - name: Fetch node_modules |
| 58 | + uses: actions/cache@v4 |
| 59 | + id: fetch-node_modules |
| 60 | + with: |
| 61 | + key: node_modules-${{ runner.os }}-${{ hashFiles('./dashboard/pnpm-lock.yaml') }} |
| 62 | + path: ./dashboard/node_modules |
| 63 | + |
| 64 | + - name: Install pnpm |
| 65 | + uses: pnpm/action-setup@v4 |
| 66 | + with: |
| 67 | + version: 9.15.2 |
| 68 | + |
| 69 | + - uses: actions/setup-node@v4 |
| 70 | + with: |
| 71 | + node-version-file: './dashboard/.nvmrc' |
| 72 | + |
| 73 | + - name: Cache Pre-Commit Hooks |
| 74 | + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 |
| 75 | + with: |
| 76 | + path: ~/.cache/pre-commit |
| 77 | + key: pre-commit-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.pre-commit-config.yaml') }} |
| 78 | + - name: Setup pre-commit |
| 79 | + run: pip install pre-commit |
| 80 | + - name: Run pre-commit hooks |
| 81 | + run: pre-commit run --all-files --show-diff-on-failure |
| 82 | + |
64 | 83 | build-front: |
65 | 84 | if: github.event.pull_request.draft != true |
66 | 85 | needs: setup-node |
@@ -164,7 +183,7 @@ jobs: |
164 | 183 | if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) |
165 | 184 | runs-on: ubuntu-latest |
166 | 185 | needs: |
167 | | - - lint-and-unit-test-django |
| 186 | + - unit-test-django |
168 | 187 | - integration-test-django |
169 | 188 | permissions: |
170 | 189 | contents: write |
|
0 commit comments