Add Github Actions test workflow #1
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: Deploy docs to GitHub Pages | |
on: | |
- push | |
concurrency: | |
group: "tests" | |
cancel-in-progress: false | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16, 18, 20] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Restore cache | |
uses: actions/cache@v3 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-nodejs-${{ matrix.node-version}}-${{ github.ref }}-${{ hashFiles('package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-nodejs-${{ matrix.node-version}}-${{ github.ref }}-${{ hashFiles('package-lock.json') }} | |
${{ runner.os }}-nodejs-${{ matrix.node-version}}-${{ github.ref }}- | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: npm | |
- name: Run Tests | |
uses: paambaati/[email protected] | |
env: | |
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | |
with: | |
coverageCommand: npm run test-coverage | |
- name: Run Tests | |
run: npm test-coverage | |
- name: Send coverage to Coveralls | |
uses: coverallsapp/github-action@v2 |