Skip to content

Fix cjs and esm dist export. #16

Fix cjs and esm dist export.

Fix cjs and esm dist export. #16

Workflow file for this run

name: Node.js CI
on: [push]
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
node-version: [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 }}
- run: npm install
- name: Run eslint
run: npm run lint
test-node:
runs-on: ubuntu-latest
needs: [lint]
timeout-minutes: 10
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- uses: actions/checkout@v3
- name: Install with Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x
- run: npm install
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Run ESM test with Node.js ${{ matrix.node-version }}
run: npm run test-node
- name: Run CJS test with Node.js ${{ matrix.node-version }}
run: npm run test-node-cjs
test-karma:
runs-on: ubuntu-latest
needs: [lint, test-node]
timeout-minutes: 10
strategy:
matrix:
node-version: [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 }}
- run: npm install
- name: Run karma tests
run: npm run test-karma
coverage:
needs: [test-node, test-karma]
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
node-version: [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 }}
- run: npm install
- name: Generate coverage report
run: npm run coverage-ci
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage/lcov.info
fail_ci_if_error: true