Specify the order of content within declaration blocks #81
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and test | |
on: | |
- pull_request | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
node-version: [ 18, 20 ] | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Cache node modules | |
uses: actions/cache@v4 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-v${{ matrix.node }}-${{ hashFiles('package-lock.json') }}-${{ hashFiles('.github/workflows/test.yml') }} | |
restore-keys: | | |
${{ runner.OS }}-node-v${{ matrix.node }}-${{ hashFiles('package-lock.json') }}-${{ hashFiles('.github/workflows/test.yml') }} | |
${{ runner.OS }}-node-v${{ matrix.node }}- | |
- name: Install | |
run: npm ci | |
- name: Test | |
run: npm test |