diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 00000000..9dd959e6 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,37 @@ +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: Build AIR constraints + run: make build-constraints + + - name: Install tarpaulin + uses: baptiste0928/cargo-install@v2 + with: + crate: cargo-tarpaulin + version: "^0.26" + + - name: Run tarpaulin + run: cargo tarpaulin --all-features --workspace --timeout 240 --out Lcov + + - name: Upload coverage to coveralls.io + uses: coverallsapp/github-action@v2 + + - name: Archive coverage results + uses: actions/upload-artifact@v3 + with: + name: coverage-report + path: lcov.info diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ff5d4632..2bb0c03f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 @@ -47,12 +47,6 @@ 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 @@ -60,7 +54,7 @@ jobs: run: make clippy-only - name: Run tests - run: make test + run: cargo test --all-targets - name: Run benchmarks - run: make bench \ No newline at end of file + run: cargo bench --all-targets diff --git a/Makefile b/Makefile index c24d4fac..f62eb36e 100644 --- a/Makefile +++ b/Makefile @@ -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)