|
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node |
|
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions |
|
|
|
name: Node.js CI |
|
|
|
on: |
|
push: |
|
branches: [ main ] |
|
pull_request: |
|
branches: [ main ] |
|
|
|
jobs: |
|
test: |
|
name: Test on Node.js |
|
uses: pkgjs/action/.github/workflows/node-test.yaml@v0 |
|
with: |
|
# We need to fetch some specific commits that we are using in our tests. We also need `--deepen=2` for CodCov. |
|
post-checkout-steps: | |
|
- run: git fetch --deepen=2 origin 2b98d02b52a0abe98054eccb351e1e5c71c81bb0 69435db261650dfc74ede6dca89acbe97ba30081 |
|
shell: bash |
|
post-install-steps: | |
|
- run: npm run build --if-present |
|
shell: bash |
|
test-command: npm run test-ci |
|
post-test-steps: | |
|
- name: Upload coverage report to Codecov |
|
run: bash <(curl -s https://codecov.io/bash) |
|
shell: bash |