Emit ESM and CJS, built with rollup (#121) #429
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
--- | |
on: push | |
name: CI | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/setup-node@master | |
with: | |
node-version: 20 | |
- name: check node version | |
run: node --version | |
- name: check npm version | |
run: npm --version | |
- name: check npx path | |
run: which npx | |
- name: check npx version | |
run: npx --version | |
- name: npm install | |
run: npm install | |
- name: lint | |
run: npm run lint | |
- name: build | |
run: npm run build | |
- name: compile typescript | |
run: npx tsc | |
- name: test | |
run: npm run test | |
- name: generate coverage | |
run: npm run coverage | |
- name: check coverage | |
run: npx c8 check-coverage --lines 99 --functions 99 --branches 99 --statements 99 | |
- name: examples do not crash | |
run: for f in examples/*.ts; do npx tsx "$f" || (echo "'$f' crashed"; exit 1); done |