Skip to content

Commit

Permalink
Update fastify.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
adamlogic committed Apr 19, 2024
1 parent 7ef66f3 commit f230b16
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions .github/workflows/fastify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,30 @@ jobs:
node-version: [18.x, 20.x]
fastify-version: [3.x, 4.x]

defaults:
run:
working-directory: fastify

steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
- name: Set up Node.js
uses: actions/setup-node@v3
with:
# We can't use `cache: npm` because setup-node doesn't support our monorepo setup
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install dependencies
run: npm install
- name: Cache Node modules
uses: actions/cache@v2
with:
# manual caching within our subdirectory
path: fastify/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('fastify/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Fastify ${{ matrix.fastify-version }}
run: npm install fastify@${{ matrix.fastify-version }}
- name: Install dependencies
run: |
npm install
npm install fastify@${{ matrix.fastify-version }}
working-directory: fastify

- name: Run tests
run: npm test
working-directory: fastify

0 comments on commit f230b16

Please sign in to comment.