Skip to content

Instantly share code, notes, and snippets.

@tsmx
Last active June 28, 2021 18:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsmx/e22400458a214dd929656786e293e543 to your computer and use it in GitHub Desktop.
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.
# 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