test: update error handling in command error tests to throw specific … #109
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: | |
- main | |
- develop | |
pull_request: | |
types: [opened, synchronize, reopened] | |
workflow_dispatch: | |
jobs: | |
unit-tests: | |
strategy: | |
matrix: | |
os: | |
- 'ubuntu-latest' | |
- 'windows-latest' | |
- 'macos-latest' | |
node_version: | |
- 'lts/*' | |
fail-fast: false | |
max-parallel: 1 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: pnpm/action-setup@v4 | |
with: | |
run_install: true | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node_version }} | |
cache: 'pnpm' | |
- run: pnpm install -D tap-junit | |
- run: pnpm run test:coverage | pnpm exec tap-junit > junit.xml | |
- name: SonarQube Scan | |
if: matrix.os == 'ubuntu-latest' | |
uses: SonarSource/sonarqube-scan-action@v4.1.0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
- name: Codecov Scan | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Upload test results to Codecov | |
if: ${{ !cancelled() }} | |
uses: codecov/test-results-action@v1.0.1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: junit.xml,!./cache | |
fail_ci_if_error: true |