Skip to content

Test and deploy

Test and deploy #34

Workflow file for this run

name: Test and deploy
on:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16, 18, 20]
name: Node ${{ matrix.node-version }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version}}
cache: 'npm'
- name: Cache node modules
uses: actions/cache@v3
with:
path: './node_modules'
key: node-${{ matrix.node-version }}-modules-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
run: npm install
- name: Run tests
run: npm test
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true