AB-454: Setup coverage report and send to looker #900
This file contains hidden or 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: Test | |
on: | |
push: | |
branches: [develop, master] | |
pull_request: | |
jobs: | |
Unit-Tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x, 20.x, 22.x] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm ci | |
- run: npm run test-lint | |
- run: npm run test-system | |
- run: npm run test-unit | tee coverage.txt && exit ${PIPESTATUS[0]} | |
- name: Upload coverage-summary.json | |
if: matrix.node-version == '22.x' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-summary-unit | |
path: | | |
.coverage/coverage-summary.json | |
coverage.txt | |
Regression: | |
needs: Unit-Tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x, 20.x, 22.x] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm ci | |
- run: npm run test-regression | tee coverage.txt && exit ${PIPESTATUS[0]} | |
- name: Upload coverage-summary.json | |
if: matrix.node-version == '22.x' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-summary-integration | |
path: | | |
.coverage/coverage-summary.json | |
coverage.txt |