Skip to content

Commit afa9976

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 1cd516f commit afa9976

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-24.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: [16.x, 18.x, 20.x, 22.x]
2123
steps:
2224
# Install libssl1.1 for libcrypto.so.1.1, which is required for binaries before 22.04 is available (4.0, 4.2, 4.4, 5.0)
@@ -53,10 +55,10 @@ jobs:
5355
uses: actions/cache@v4
5456
with:
5557
path: ~/.cache/mongodb-binaries
56-
key: ${{ matrix.node-version }}-${{ hashFiles('**/globalSetup.ts') }}
58+
key: ${{ matrix.distro }}-${{ hashFiles('**/globalSetup.ts') }}
5759
restore-keys: |
58-
${{ matrix.node-version }}-
59-
${{ matrix.node-version }}
60+
${{ matrix.distro }}-
61+
${{ matrix.distro }}
6062
- name: Install node_modules
6163
run: yarn
6264
- name: TSCheck

0 commit comments

Comments
 (0)