88
99jobs :
1010 lint :
11- name : Lint and Validate
12- runs-on : ubuntu-latest
11+ name : Lint and Validate (${{ matrix.os }})
12+ runs-on : ${{ matrix.os }}
13+ strategy :
14+ matrix :
15+ os : [ubuntu-latest, windows-latest, macos-latest]
1316
1417 steps :
1518 - name : Checkout code
@@ -19,38 +22,40 @@ jobs:
1922 uses : actions/setup-node@v4
2023 with :
2124 node-version : " 22"
22- cache : " npm"
25+
26+ - uses : pnpm/action-setup@v4
27+ name : Install pnpm
28+ id : pnpm-install
29+ with :
30+ version : 7
31+ run_install : false
32+
33+ - name : Get pnpm store directory
34+ id : pnpm-cache
35+ shell : bash
36+ run : |
37+ echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
38+
39+ - uses : actions/cache@v5
40+ name : Setup pnpm cache
41+ with :
42+ path : ${{ steps.pnpm-cache.outputs.STORE_PATH }}
43+ key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
44+ restore-keys : |
45+ ${{ runner.os }}-pnpm-store-
2346
2447 - name : Install dependencies
25- run : npm ci
48+ run : pnpm install --frozen-lockfile
2649
2750 - name : Run oxlint and TypeScript checks
28- run : npm run lint
51+ run : pnpm run lint
2952
3053 - name : Validate Docker Compose file
54+ if : matrix.os == 'ubuntu-latest'
3155 run : docker compose -f docker-compose.yaml config --quiet
3256
3357 - name : Lint Dockerfile with Hadolint
34- uses : hadolint/hadolint-action@v3.1.0
35- with :
36- dockerfile : Dockerfile
37- failure-threshold : error
38-
39- docker-validation :
40- name : Docker Validation
41- runs-on : ubuntu-latest
42-
43- steps :
44- - name : Checkout code
45- uses : actions/checkout@v4
46-
47- - name : Validate docker-compose.yaml
48- run : |
49- echo "Validating docker-compose.yaml with Docker Compose..."
50- docker compose -f docker-compose.yaml config --quiet
51- echo "✓ docker-compose.yaml is valid"
52-
53- - name : Lint Dockerfile
58+ if : matrix.os == 'ubuntu-latest'
5459 uses : hadolint/hadolint-action@v3.1.0
5560 with :
5661 dockerfile : Dockerfile
0 commit comments