Skip to content

Commit

Permalink
ci: add GitHub Actions matrix
Browse files Browse the repository at this point in the history
Basically same as agilgur5/react-signature-canvas@514dec0, but I hadn't added Travis CI yet here due to the reasons mentioned there
Fixes #1

- this is basically a mix of the Actions I helped set-up in rpt2's repo and the TSDX templates:
  - https:/ezolenko/rollup-plugin-typescript2/blob/03cfb048adcf39de56bd4566dc9a7300534a3cc1/.github/workflows/nodejs.yml
  - https:/jaredpalmer/tsdx/blob/2d7981b00b2bf7363a3eeff44ff5ff698ba58c8c/templates/basic/.github/workflows/main.yml
  - plus upgrades to all the Actions, for instance, newer `setup-node` now has caching built-in
  - and plus Codecov GH Action
  • Loading branch information
agilgur5 committed Jun 14, 2022
1 parent f88e1b7 commit 417285e
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI
on: [push]
jobs:
ci:
name: CI - Node ${{ matrix.node-version }}, ${{ matrix.os }}

runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [14.x, 16.x, 18.x] # LTS Node: https://nodejs.org/en/about/releases/
os: [ubuntu-latest, windows-latest, macOS-latest]

steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install
run: npm ci

- name: Typecheck
run: npm run tsc
- name: Lint
run: npm run lint
- name: Build
run: npm run build

- name: Test w/ coverage report
run: npm run test:coverage
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v2

0 comments on commit 417285e

Please sign in to comment.