Skip to content

Commit 7bf24a8

Browse files
committed
chore(workflows/tests): change cache to use "runs-on" instead of "node-version"
as mongodb cache does not change between node versions, but actual OS
1 parent a2fa28e commit 7bf24a8

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/tests.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ on:
1414

1515
jobs:
1616
tests:
17-
runs-on: ubuntu-22.04
17+
runs-on: ${{ matrix.distro }}
1818
strategy:
1919
matrix:
20+
# this is a hack as there is currently no (public) way to access "runs-on" with version
21+
distro: [ubuntu-22.04]
2022
node-version: [14.x, 16.x, 18.x, 20.x, 22.x]
2123
steps:
2224
- uses: actions/checkout@v4
@@ -37,10 +39,10 @@ jobs:
3739
uses: actions/cache@v4
3840
with:
3941
path: ~/.cache/mongodb-binaries
40-
key: ${{ matrix.node-version }}-${{ hashFiles('**/globalSetup.ts') }}
42+
key: ${{ matrix.distro }}-${{ hashFiles('**/globalSetup.ts') }}
4143
restore-keys: |
42-
${{ matrix.node-version }}-
43-
${{ matrix.node-version }}
44+
${{ matrix.distro }}-
45+
${{ matrix.distro }}
4446
- name: Install node_modules
4547
run: yarn
4648
- name: TSCheck

0 commit comments

Comments
 (0)