-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (50 loc) · 1.89 KB
/
coverage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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://git@github.com/
- 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/cache@v3.3.2
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