Last active
June 28, 2021 18:51
-
-
Save tsmx/e22400458a214dd929656786e293e543 to your computer and use it in GitHub Desktop.
Building a NodeJS app for multiple node versions with GitHub actions and report test results to Coveralls.
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
# save as ./github/workflows/git-ci-build.yml | |
# make sure that 'test-coverage' generates the coverage reports (lcov) | |
name: git-ci-build | |
on: | |
[push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [12.x, 14.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm ci | |
- run: npm run test-coverage | |
- name: Coveralls | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment