Skip to content

Add GitHub Actions badge to readme #4

Add GitHub Actions badge to readme

Add GitHub Actions badge to readme #4

Workflow file for this run

name: Tests
on:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node: [18, 20]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Cache npm dependencies
uses: actions/cache@v3
id: npm-cache
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ matrix.node }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.node }}-npm-
- name: Install npm dependencies
run: npm ci
- name: Run Vitest tests
run: npm run test
env:
CI: true