Skip to content

Commit 8057298

Browse files
ci: use lts/* to describe Node.js version
With this indirection, we can configure a required status check that doesn't require updating when Node.js LTS versions change. (The matrix version appears in the name of the status check, this was the least-gross workaround I could find. Peer here for some horror shows: https://github.community/t/status-check-for-a-matrix-jobs/127354/11)
1 parent b0d0f73 commit 8057298

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010

1111
strategy:
1212
matrix:
13-
node-version: ['12', '14', '16']
13+
node-version: ['12', '14', 'lts/*']
1414

1515
name: Node.js ${{ matrix.node-version }}
1616
steps:
@@ -35,7 +35,9 @@ jobs:
3535
uses: actions/cache@v3
3636
with:
3737
path: node_modules/.cache
38-
key: turbo-${{ matrix.node-version }}-${{ github.ref_name }}-${{ github.job }}-${{ github.sha }}
38+
key:
39+
turbo-${{ matrix.node-version }}-${{ github.ref_name }}-${{ github.job
40+
}}-${{ github.sha }}
3941
# According to GitHub documentation, only keys generated by the PR branch and the target branch are considered. This is
4042
# to prevent a malicious PR from manipulating the cache to inject malicious code into unrelated branches.
4143
# See: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key

0 commit comments

Comments
 (0)