everyone loves badges #3
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
name: Build and Test | |
on: [push] | |
jobs: | |
test: | |
runs-on: [ubuntu-latest] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install NodeJS | |
uses: dcodeIO/setup-node-nvm@master | |
with: | |
node-version: lts/* | |
- run: npm i | |
- name: Run tests | |
run: npm test | |
coverage: | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install NodeJS | |
uses: dcodeIO/setup-node-nvm@master | |
with: | |
node-version: lts/* | |
- run: npm i | |
- name: Get coverage | |
run: npm run lcov | |
- name: Coveralls | |
uses: coverallsapp/github-action@v2 | |
with: | |
file: './coverage/lcov.info' |