Skip to content

Commit 6606436

Browse files
cpcloudclaude
andcommitted
ci: flatten two-entry matrices into explicit jobs
Replace the nix-lint and nix-security matrix strategies with standalone jobs. Two entries don't justify the indirection of a matrix. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 20e43a8 commit 6606436

2 files changed

Lines changed: 42 additions & 26 deletions

File tree

.github/workflows/lint.yml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,37 @@ permissions:
1313
contents: read
1414

1515
jobs:
16-
nix-lint:
17-
name: ${{ matrix.name }}
16+
deadcode:
17+
name: Dead Code
1818
runs-on: ubuntu-latest
1919
concurrency:
20-
group: lint-${{ matrix.tool }}-${{ github.ref }}
20+
group: lint-deadcode-${{ github.ref }}
2121
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
22-
strategy:
23-
fail-fast: ${{ github.event_name == 'pull_request' }}
24-
matrix:
25-
include:
26-
- tool: deadcode
27-
name: Dead Code
28-
- tool: golangci-lint
29-
name: Lint
3022
steps:
3123
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
3224
with:
3325
persist-credentials: false
3426

3527
- uses: cachix/install-nix-action@4e002c8ec80594ecd40e759629461e26c8abed15 # v31
3628

37-
- name: Run ${{ matrix.tool }}
38-
run: nix run '.#${{ matrix.tool }}'
29+
- name: Run deadcode
30+
run: nix run '.#deadcode'
31+
32+
golangci-lint:
33+
name: Lint
34+
runs-on: ubuntu-latest
35+
concurrency:
36+
group: lint-golangci-lint-${{ github.ref }}
37+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
38+
steps:
39+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
40+
with:
41+
persist-credentials: false
42+
43+
- uses: cachix/install-nix-action@4e002c8ec80594ecd40e759629461e26c8abed15 # v31
44+
45+
- name: Run golangci-lint
46+
run: nix run '.#golangci-lint'
3947

4048
pre-commit:
4149
name: Pre-commit

.github/workflows/security.yml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,37 @@ permissions:
1313
contents: read
1414

1515
jobs:
16-
nix-security:
17-
name: ${{ matrix.name }}
16+
govulncheck:
17+
name: Vulnerability Check
1818
runs-on: ubuntu-latest
1919
concurrency:
20-
group: security-${{ matrix.tool }}-${{ github.ref }}
20+
group: security-govulncheck-${{ github.ref }}
2121
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
22-
strategy:
23-
fail-fast: ${{ github.event_name == 'pull_request' }}
24-
matrix:
25-
include:
26-
- tool: govulncheck
27-
name: Vulnerability Check
28-
- tool: osv-scanner
29-
name: OSV Scan
3022
steps:
3123
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
3224
with:
3325
persist-credentials: false
3426

3527
- uses: cachix/install-nix-action@4e002c8ec80594ecd40e759629461e26c8abed15 # v31
3628

37-
- name: Run ${{ matrix.tool }}
38-
run: nix run '.#${{ matrix.tool }}'
29+
- name: Run govulncheck
30+
run: nix run '.#govulncheck'
31+
32+
osv-scanner:
33+
name: OSV Scan
34+
runs-on: ubuntu-latest
35+
concurrency:
36+
group: security-osv-scanner-${{ github.ref }}
37+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
38+
steps:
39+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
40+
with:
41+
persist-credentials: false
42+
43+
- uses: cachix/install-nix-action@4e002c8ec80594ecd40e759629461e26c8abed15 # v31
44+
45+
- name: Run osv-scanner
46+
run: nix run '.#osv-scanner'
3947

4048
secrets:
4149
name: Secret Scan

0 commit comments

Comments
 (0)