Run tests #1106
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: Run tests | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '0 0 * * *' # every day at midnight | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x, 21.x] | |
name: Node.js ${{ matrix.node-version }} | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v4 | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.npm/cache/files | |
key: dependencies-nodejs-${{ matrix.node-version }}-package-${{ hashFiles('package.json') }} | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: npm install | |
- name: Run tests | |
run: npm test | |
env: | |
CI: true |