diff --git a/.github/workflows/codecov.yaml b/.github/workflows/codecov.yaml new file mode 100644 index 000000000..38a1c18a8 --- /dev/null +++ b/.github/workflows/codecov.yaml @@ -0,0 +1,34 @@ +name: codecov scan + +on: + pull_request: + push: + branches: + - master + workflow_dispatch: + +jobs: + run: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4.1.0 + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 22.11.0 + - name: Authenticate with GitHub package registry + run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc + - name: Install dependencies + run: npm install + - name: Run unit tests with coverage + run: npm run unit-coverage + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5.1.2 + with: + token: ${{ secrets.CODECOV_TOKEN }} # create your CODECOV_TOKEN using the token from 'set repo' in codecov site + flags: target=auto + fail_ci_if_error: true + verbose: false