To create a codecov token (free use for opensource repos):
- login to https://about.codecov.io/
- install app in organization: https://github.com/apps/codecov/installations/new
- create org token: https://app.codecov.io/account/github/rngadam/org-upload-token
- set organization secret CODECOV_TOKEN=$TOKEN in https://github.com/MCN-ING/anoncreds-rs/settings/secrets/actions
- run workflow
- name: Checkout
uses: actions/checkout@v3
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_VERSION }}
- name: Cache cargo resources
uses: Swatinem/rust-cache@v2
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Test Linux and macOS
if: ${{ runner.os != 'Windows' }}
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
files: lcov.info
fail_ci_if_error: true