Update Github action to include full test #2
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: Unit Tests | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: Install dependencies | |
run: | | |
npm install | |
- name: Start demo firmware | |
run: | | |
grunt shell:startDemo | |
- name: Run test steps | |
run: | | |
grunt test | |
- name: Stop demo firmware | |
run: | | |
grunt shell:stopDemo | |
- name: Aggregate and post results | |
run: | | |
lcov-result-merger './coverage/results-*.lcov' './coverage/results.lcov' | |
cat coverage/results.lcov | codecov.io.js | |
cat coverage/results.lcov | coveralls |