Skip to content

Commit

Permalink
use CI to upload code coverage results to coveralls.io
Browse files Browse the repository at this point in the history
Also:
 • update makefile
 • update main CI file to reduce time spent building projects
  • Loading branch information
jan-ferdinand committed Aug 4, 2023
1 parent 722ebaf commit 9562abd
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 9 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Coverage
on: ["push", "pull_request"]

jobs:
coverage:
name: Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable

- name: Run cargo tarpaulin
uses: actions-rs/[email protected]
with:
version: '0.22.0'
timeout: '240'
out-type: 'Lcov'

- name: Upload coverage results to coveralls.io
uses: coverallsapp/github-action@v2

- name: Archive code coverage results
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
path: cobertura.lcov
12 changes: 3 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ name: Rust

jobs:
build:
name: Build, lint, test and bench
name: Build, lint, test, bench, coverage
runs-on: ubuntu-latest
steps:
- name: Checkout sources
Expand Down Expand Up @@ -47,20 +47,14 @@ jobs:
- name: Build constraints
run: make build-constraints

- name: Build tests
run: make build-tests

- name: Build bench
run: make build-bench

- name: Run fmt
run: make fmt-only

- name: Run clippy
run: make clippy-only

- name: Run tests
run: make test
run: cargo test --all-targets

- name: Run benchmarks
run: make bench
run: cargo bench --all-targets
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ build-constraints:

clean-constraints:
git restore --staged triton-vm/src/table/constraints.rs
git restore --staged triton-vm/src/table/degree_lowering_table.rs
git restore triton-vm/src/table/constraints.rs
git restore triton-vm/src/table/degree_lowering_table.rs

fmt-only:
cargo fmt $(FMT_ARGS)
Expand Down

0 comments on commit 9562abd

Please sign in to comment.