Skip to content

Merge pull request #176 from jplomas/main #422

Merge pull request #176 from jplomas/main

Merge pull request #176 from jplomas/main #422

Workflow file for this run

name: Code Coverage
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
coverage:
name: Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Use Node.js 22.x
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '22.x'
- run: npm ci
# report-coverage runs the full suite under c8 (and fails on any test
# failure), so a separate `npm test` here would only run everything
# twice. The standalone test matrix lives in ci.yml.
- run: npm run report-coverage
# Push uploads gate hard (fail_ci_if_error: true); PR uploads are
# best-effort so a Codecov hiccup can't block a PR — the coverage
# status checks themselves still come from codecov.yml targets.
- name: Upload dilithium5 coverage to Codecov
if: github.repository == 'theQRL/qrypto.js' && github.event_name == 'push'
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./packages/dilithium5/coverage.lcov
flags: dilithium5
fail_ci_if_error: true
- name: Upload mldsa87 coverage to Codecov
if: github.repository == 'theQRL/qrypto.js' && github.event_name == 'push'
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./packages/mldsa87/coverage.lcov
flags: mldsa87
fail_ci_if_error: true
- name: Upload dilithium5 coverage to Codecov (PR)
if: github.repository == 'theQRL/qrypto.js' && github.event_name == 'pull_request'
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./packages/dilithium5/coverage.lcov
flags: dilithium5
fail_ci_if_error: false
- name: Upload mldsa87 coverage to Codecov (PR)
if: github.repository == 'theQRL/qrypto.js' && github.event_name == 'pull_request'
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./packages/mldsa87/coverage.lcov
flags: mldsa87
fail_ci_if_error: false