Skip to content
This repository has been archived by the owner on Dec 3, 2024. It is now read-only.

Code Coverage Workflow #127

Code Coverage Workflow

Code Coverage Workflow #127

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: Configure Git
run: |
git config --global url."https://ancient123:${{ secrets.ORG_GITHUB_PAT }}@github.com/".insteadOf git://github.com/
git config --global url."https://ancient123:${{ secrets.ORG_GITHUB_PAT }}@github.com/".insteadOf ssh://[email protected]/
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v24
- name: Enable Cachix
uses: cachix/cachix-action@v13
# 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