Skip to content

Commit

Permalink
chore(workflows/tests): change cache to use "runs-on" instead of "nod…
Browse files Browse the repository at this point in the history
…e-version"

as mongodb cache does not change between node versions, but actual OS
  • Loading branch information
hasezoey committed Nov 1, 2024
1 parent 1cd516f commit afa9976
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ on:

jobs:
tests:
runs-on: ubuntu-24.04
runs-on: ${{ matrix.distro }}
strategy:
matrix:
# this is a hack as there is currently no (public) way to access "runs-on" with version
distro: [ubuntu-22.04]
node-version: [16.x, 18.x, 20.x, 22.x]
steps:
# 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)
Expand Down Expand Up @@ -53,10 +55,10 @@ jobs:
uses: actions/cache@v4
with:
path: ~/.cache/mongodb-binaries
key: ${{ matrix.node-version }}-${{ hashFiles('**/globalSetup.ts') }}
key: ${{ matrix.distro }}-${{ hashFiles('**/globalSetup.ts') }}
restore-keys: |
${{ matrix.node-version }}-
${{ matrix.node-version }}
${{ matrix.distro }}-
${{ matrix.distro }}
- name: Install node_modules
run: yarn
- name: TSCheck
Expand Down

0 comments on commit afa9976

Please sign in to comment.