Skip to content

Merge pull request #506 from EspressoSystems/rm/update-hotshot-2 #261

Merge pull request #506 from EspressoSystems/rm/update-hotshot-2

Merge pull request #506 from EspressoSystems/rm/update-hotshot-2 #261

Workflow file for this run

name: Code Coverage Workflow
on:
push:
branches:
- main
- release-*
schedule:
- cron: "0 1 * * 1"
workflow_dispatch:
jobs:
code-coverage:
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v26
- name: Enable Cachix
uses: cachix/cachix-action@v14
# If PR is from a non-collaborator (e.g. dependabot) the secrets are missing and the login to cachix fails.
continue-on-error: true
with:
name: espresso-systems-private
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
extraPullNames: nix-community
skipPush: ${{ github.actor == 'dependabot[bot]' }}
- name: Cache cargo
uses: actions/[email protected]
with:
path: |
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git
target
key: hotshot-query-service-codecov-v1-${{ hashFiles('Cargo.lock') }}
- name: Generate coverage reports
run: |
git config --global --add safe.directory "$PWD"
nix run "github:NixOS/nix?ref=1849e6a1f64734c488c2b1469249d65ce08cef93" -- develop .#perfShell -c cargo llvm-cov --profile=release --all-features --all-targets --lcov --output-path lcov.info -- --test-threads 1
- name: Coveralls upload
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: lcov.info
fail_ci_if_error: true