Skip to content

simplify dynamic optional imports #89

simplify dynamic optional imports

simplify dynamic optional imports #89

Workflow file for this run

name: Pipeline
on: push
jobs:
check:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 20.x]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org
- run: npm install
- run: npm run lint
if: ${{ matrix.node-version != '14.x' }}
- run: npm run format-check
- run: npm run build
- run: npm run build-examples
# workaround for https://github.com/jestjs/jest/issues/11438
- run: npm run test-coverage -- --maxWorkers=7
if: ${{ matrix.node-version == '14.x' }}
env:
CI: true
# end workaround
- run: npm run test-coverage
if: ${{ matrix.node-version != '14.x' }} # see above
env:
CI: true
- run: npx codecov || echo "Codecov failed, ignoring"
if: ${{ github.ref == 'refs/heads/main' && matrix.node-version == '18.x' }}
publish:
if: github.ref == 'refs/heads/main'
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 14.x
registry-url: https://registry.npmjs.org
- run: npm install
- run: npm run build
- run: npm publish || echo "Already published"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}