This repository has been archived by the owner on Jul 8, 2023. It is now read-only.
Update Node.js versions to test against #546
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: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
schedule: | |
- cron: '0 0 1 * *' # Once a month | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x, 18.x, 20.x] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: npm | |
- run: npm ci | |
- name: Lint | |
run: npm run lint | |
- name: Run unit tests | |
run: npm test | |
coverage: | |
needs: [test] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x # Fails on 18 | |
cache: npm | |
- run: npm ci | |
- name: Create coverage report | |
# Third-party action, pin to commit SHA! | |
# See https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions | |
uses: paambaati/codeclimate-action@5f637ccd517bc8960de0fe59379dd922bcba9486 | |
env: | |
CC_TEST_REPORTER_ID: cbe1ba43d6de77501997cd85b35dec2002f3a06db28fe46bc6ed10bc3d613111 | |
with: | |
coverageCommand: npm run coverage | |
e2e: | |
needs: [test] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20.x | |
cache: npm | |
- run: npm ci | |
- run: npx playwright install --with-deps chrome firefox webkit msedge | |
- run: npm run build | |
- name: Run E2E tests | |
run: npm run test:e2e | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 |