diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 837c2e26..37691fc7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,6 +18,8 @@ jobs: test: runs-on: ubuntu-latest name: Lint and test project + permissions: + id-token: write strategy: matrix: node: ['22', '24'] @@ -111,3 +113,12 @@ jobs: name: coverage path: ./coverage/coverage-final.json + - name: Upload coverage to Codecov + if: ${{ matrix.node == env.MAIN_NODE_VER }} + uses: codecov/codecov-action@v5 + with: + use_oidc: true + flags: unit-tests + files: ./coverage/lcov.info + slug: guacsec/trustify-da-javascript-client + diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 00000000..0533fbf5 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,25 @@ +coverage: + status: + project: + default: + target: auto + threshold: 1% + informational: true + patch: + default: + target: auto + threshold: 1% + informational: true + +ignore: + - "node_modules/**" + - "dist/**" + - "coverage/**" + +flags: + unit-tests: + carryforward: true + +comment: + layout: "reach,diff,flags,files" + behavior: default diff --git a/package.json b/package.json index db75ae72..3adfdb15 100644 --- a/package.json +++ b/package.json @@ -112,6 +112,7 @@ "reporter": [ "html", "json", + "lcov", "text" ] },