Skip to content

Commit

Permalink
build(ci): add Rust unit testing and codecov reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
wilhelmagren committed Nov 11, 2023
1 parent c586296 commit 383382c
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Tests

on:
pull_request:
push:
branches: [ main ]

jobs:
tests:
name: Unittests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
rust: [ stable ]

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
components: llvm-tools-preview
override: true
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Run tests
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
- name: Upload coverage report
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
fail_ci_if_error: true

0 comments on commit 383382c

Please sign in to comment.