|
6 | 6 | pull_request: |
7 | 7 | branches: ["main"] |
8 | 8 | types: [opened, synchronize, reopened, edited] |
9 | | - paths: |
10 | | - - "src/web/**" |
11 | | - - ".github/workflows/web.yml" |
12 | | - - ".github/actions/**" |
13 | 9 |
|
14 | 10 | permissions: |
15 | 11 | contents: read |
16 | 12 |
|
17 | 13 | jobs: |
| 14 | + check-changes: |
| 15 | + runs-on: ubuntu-latest |
| 16 | + outputs: |
| 17 | + relevant: ${{ steps.filter.outputs.relevant }} |
| 18 | + steps: |
| 19 | + - uses: actions/checkout@v6 |
| 20 | + - uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d |
| 21 | + id: filter |
| 22 | + with: |
| 23 | + filters: | |
| 24 | + relevant: |
| 25 | + - "src/web/**" |
| 26 | + - ".github/workflows/web.yml" |
| 27 | + - ".github/actions/**" |
| 28 | +
|
18 | 29 | build-web: |
| 30 | + needs: check-changes |
| 31 | + if: github.event_name == 'push' || needs.check-changes.outputs.relevant == 'true' |
19 | 32 | runs-on: ubuntu-latest |
20 | 33 | defaults: |
21 | 34 | run: |
22 | 35 | working-directory: ./src/web |
23 | 36 | steps: |
24 | | - - uses: actions/checkout@v5 |
| 37 | + - uses: actions/checkout@v6 |
25 | 38 | - uses: ./.github/actions/setup-uv-python |
26 | 39 | with: |
27 | 40 | service-path: src/web |
|
34 | 47 | run: pnpm run build |
35 | 48 |
|
36 | 49 | lint-web: |
37 | | - needs: build-web |
| 50 | + needs: [check-changes, build-web] |
| 51 | + if: github.event_name == 'push' || needs.check-changes.outputs.relevant == 'true' |
38 | 52 | runs-on: ubuntu-latest |
39 | 53 | defaults: |
40 | 54 | run: |
|
44 | 58 | WEB_DATABASE_URL: psql://web:pass@localhost:5432/web |
45 | 59 | DJANGO_SETTINGS_MODULE: config.settings.test |
46 | 60 | steps: |
47 | | - - uses: actions/checkout@v5 |
| 61 | + - uses: actions/checkout@v6 |
48 | 62 | - uses: ./.github/actions/setup-uv-python |
49 | 63 | with: |
50 | 64 | service-path: src/web |
|
73 | 87 | run: make lint-schema WEB_UV="cd src/web && uv run" |
74 | 88 |
|
75 | 89 | test-web: |
76 | | - needs: build-web |
| 90 | + needs: [check-changes, build-web] |
| 91 | + if: github.event_name == 'push' || needs.check-changes.outputs.relevant == 'true' |
77 | 92 | runs-on: ubuntu-latest |
78 | 93 | services: |
79 | 94 | postgresql: |
@@ -108,7 +123,7 @@ jobs: |
108 | 123 | WEB_VECTOR_DB_TYPE: QDRANT |
109 | 124 | DJANGO_SETTINGS_MODULE: config.settings.test |
110 | 125 | steps: |
111 | | - - uses: actions/checkout@v5 |
| 126 | + - uses: actions/checkout@v6 |
112 | 127 | - uses: ./.github/actions/setup-uv-python |
113 | 128 | with: |
114 | 129 | service-path: src/web |
|
0 commit comments