chore(deps): lock file maintenance #444
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: build | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
timeout-minutes: 15 | |
env: | |
CI: true | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x, 18.x, 20.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: npm | |
- name: Use NPM 8 | |
run: npm i -g npm@8 | |
- run: npm ci | |
- name: types | |
run: npm run check:types | |
- name: build | |
run: npm run build | |
- name: test | |
id: test | |
if: ${{ always() }} | |
run: npm run test | |
- name: Import with CJS | |
if: ${{ always() }} | |
run: node smoke-tests/smoke-test-cjs.cjs | |
- name: Import with ESM | |
if: ${{ always() }} | |
run: node smoke-tests/smoke-test-esm.mjs | |
- name: Import with both CJS and ESM | |
if: ${{ always() }} | |
run: node smoke-tests/smoke-test.js | |
- name: lint | |
if: ${{ always() }} | |
run: npm run lint | |
- name: style | |
if: ${{ always() }} | |
run: npm run format:check | |
codecov: # Send only a single coverage report per run | |
needs: build | |
timeout-minutes: 15 | |
env: | |
CI: true | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js lts | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
cache: npm | |
- run: npm ci | |
- name: test | |
run: npm run test:coverage | |
- name: codecov | |
uses: codecov/codecov-action@v4 |