Merge pull request #34 from trollLemon/CICD #42
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust Code Coverage | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches-ignore: | |
- main | |
jobs: | |
coverage: | |
name: Generate and Upload Code Coverage | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- name: Install tarpaulin | |
run: cargo install cargo-tarpaulin | |
- name: Build and Test with Coverage | |
run: | | |
# Run tests with coverage using tarpaulin | |
cargo tarpaulin --out xml --exclude-files none --ignore-tests | |
- name: Upload Code Coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |