|
22 | 22 | - 'install-gh-aw.sh' |
23 | 23 | workflow_dispatch: |
24 | 24 | jobs: |
| 25 | + lint-gate: |
| 26 | + name: Lint Gate |
| 27 | + runs-on: ubuntu-latest |
| 28 | + timeout-minutes: 10 |
| 29 | + permissions: |
| 30 | + contents: read |
| 31 | + concurrency: |
| 32 | + group: ci-${{ github.ref }}-lint-gate |
| 33 | + cancel-in-progress: true |
| 34 | + steps: |
| 35 | + - name: Checkout code |
| 36 | + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 37 | + |
| 38 | + - name: Set up Node.js |
| 39 | + id: setup-node |
| 40 | + uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6 |
| 41 | + with: |
| 42 | + node-version: "24" |
| 43 | + cache: npm |
| 44 | + cache-dependency-path: actions/setup/js/package-lock.json |
| 45 | + |
| 46 | + - name: Set up Go |
| 47 | + id: setup-go |
| 48 | + uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6 |
| 49 | + with: |
| 50 | + go-version-file: go.mod |
| 51 | + cache: true |
| 52 | + |
| 53 | + - name: Install npm dependencies |
| 54 | + run: npm ci |
| 55 | + working-directory: ./actions/setup/js |
| 56 | + |
| 57 | + - name: Install golangci-lint |
| 58 | + run: make install-golangci-lint |
| 59 | + |
| 60 | + - name: Run formatting + lint gate |
| 61 | + run: | |
| 62 | + make fmt-check |
| 63 | + make fmt-check-json |
| 64 | + make lint-cjs |
| 65 | +
|
25 | 66 | test: |
| 67 | + needs: |
| 68 | + - lint-gate |
26 | 69 | runs-on: ubuntu-latest |
27 | 70 | timeout-minutes: 15 |
28 | 71 | permissions: |
@@ -227,6 +270,8 @@ jobs: |
227 | 270 | retention-days: 14 |
228 | 271 |
|
229 | 272 | build: |
| 273 | + needs: |
| 274 | + - lint-gate |
230 | 275 | runs-on: ubuntu-latest |
231 | 276 | timeout-minutes: 15 |
232 | 277 | permissions: |
@@ -315,6 +360,8 @@ jobs: |
315 | 360 | GH_TOKEN: ${{ github.token }} |
316 | 361 |
|
317 | 362 | build-wasm: |
| 363 | + needs: |
| 364 | + - lint-gate |
318 | 365 | runs-on: ubuntu-latest |
319 | 366 | timeout-minutes: 15 |
320 | 367 | permissions: |
@@ -851,7 +898,15 @@ jobs: |
851 | 898 | - name: Lint error messages |
852 | 899 | run: make lint-errors |
853 | 900 |
|
| 901 | + # Custom Go analysis linters (pkg/linters via cmd/linters multichecker) |
| 902 | + # continue-on-error: the existing codebase has large functions; this step is informational |
| 903 | + - name: Run custom linters |
| 904 | + continue-on-error: true |
| 905 | + run: make golint-custom |
| 906 | + |
854 | 907 | actions-build: |
| 908 | + needs: |
| 909 | + - lint-gate |
855 | 910 | runs-on: ubuntu-latest |
856 | 911 | timeout-minutes: 10 |
857 | 912 | permissions: |
@@ -914,6 +969,8 @@ jobs: |
914 | 969 | fuzz: |
915 | 970 | # Only run fuzz tests on main branch (10s is insufficient for PRs) |
916 | 971 | if: github.ref == 'refs/heads/main' |
| 972 | + needs: |
| 973 | + - lint-gate |
917 | 974 | runs-on: ubuntu-latest |
918 | 975 | timeout-minutes: 20 |
919 | 976 | permissions: |
@@ -1072,6 +1129,8 @@ jobs: |
1072 | 1129 | retention-days: 14 |
1073 | 1130 |
|
1074 | 1131 | security: |
| 1132 | + needs: |
| 1133 | + - lint-gate |
1075 | 1134 | runs-on: ubuntu-latest |
1076 | 1135 | timeout-minutes: 15 |
1077 | 1136 | permissions: |
@@ -1131,6 +1190,8 @@ jobs: |
1131 | 1190 | security-scan: |
1132 | 1191 | # Only run security scans on main branch to reduce PR overhead |
1133 | 1192 | if: github.ref == 'refs/heads/main' |
| 1193 | + needs: |
| 1194 | + - lint-gate |
1134 | 1195 | runs-on: ubuntu-latest |
1135 | 1196 | timeout-minutes: 10 # Prevent jobs from hanging indefinitely |
1136 | 1197 | permissions: |
@@ -1201,6 +1262,8 @@ jobs: |
1201 | 1262 | run: ./gh-aw compile poem-bot ${{ matrix.tool.flag }} --verbose |
1202 | 1263 |
|
1203 | 1264 | mcp-server-compile-test: |
| 1265 | + needs: |
| 1266 | + - lint-gate |
1204 | 1267 | runs-on: ubuntu-latest |
1205 | 1268 | timeout-minutes: 10 |
1206 | 1269 | permissions: |
@@ -1373,6 +1436,8 @@ jobs: |
1373 | 1436 |
|
1374 | 1437 | cross-platform-build: |
1375 | 1438 | name: Build & Test on ${{ matrix.os }} |
| 1439 | + needs: |
| 1440 | + - lint-gate |
1376 | 1441 | runs-on: ${{ matrix.os }} |
1377 | 1442 | timeout-minutes: 20 |
1378 | 1443 | permissions: |
@@ -1503,6 +1568,8 @@ jobs: |
1503 | 1568 |
|
1504 | 1569 | alpine-container-test: |
1505 | 1570 | name: Alpine Container Test |
| 1571 | + needs: |
| 1572 | + - lint-gate |
1506 | 1573 | runs-on: ubuntu-latest |
1507 | 1574 | timeout-minutes: 20 |
1508 | 1575 | permissions: |
@@ -1639,6 +1706,8 @@ jobs: |
1639 | 1706 | rm -rf test-workspace |
1640 | 1707 |
|
1641 | 1708 | safe-outputs-conformance: |
| 1709 | + needs: |
| 1710 | + - lint-gate |
1642 | 1711 | runs-on: ubuntu-latest |
1643 | 1712 | timeout-minutes: 10 |
1644 | 1713 | permissions: |
@@ -1703,6 +1772,7 @@ jobs: |
1703 | 1772 | - validate-yaml |
1704 | 1773 | - bench |
1705 | 1774 | - check-validator-sizes |
| 1775 | + - lint-gate |
1706 | 1776 | - lint-go |
1707 | 1777 | - actions-build |
1708 | 1778 | - fuzz |
|
0 commit comments