Skip to content

Commit 8e3b9d2

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 8e3b9d2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/tests.yml

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

1515
jobs:
1616
tests:
17-
runs-on: ubuntu-22.04
17+
runs-on: ${{ matrix.distro }}
1818
strategy:
1919
matrix:
20+
distro: [ubuntu-22.04]
2021
node-version: [14.x, 16.x, 18.x, 20.x, 22.x]
2122
steps:
2223
- uses: actions/checkout@v4
@@ -37,10 +38,10 @@ jobs:
3738
uses: actions/cache@v4
3839
with:
3940
path: ~/.cache/mongodb-binaries
40-
key: ${{ matrix.node-version }}-${{ hashFiles('**/globalSetup.ts') }}
41+
key: ${{ matrix.distro }}-${{ hashFiles('**/globalSetup.ts') }}
4142
restore-keys: |
42-
${{ matrix.node-version }}-
43-
${{ matrix.node-version }}
43+
${{ matrix.distro }}-
44+
${{ matrix.distro }}
4445
- name: Install node_modules
4546
run: yarn
4647
- name: TSCheck

0 commit comments

Comments
 (0)