chore: add tests for traits WithVotes and WithSeats #14
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
on: | |
push: | |
branches: | |
- master | |
paths: | |
- ".github/workflows/tests.yml" | |
- "src/**" | |
- "Cargo.toml" | |
- "Cargo.lock" | |
pull_request: | |
branches: | |
- master | |
paths: | |
- ".github/workflows/tests.yml" | |
- "src/**" | |
- "Cargo.toml" | |
- "Cargo.lock" | |
name: 🧪 Testing and coverage | |
jobs: | |
test: | |
name: 🧪 Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: 🛒 Checkout repository | |
uses: actions/checkout@v2 | |
- name: ⚡ Cache | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cargo | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-cargo- | |
- name: 🦀 Setup Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- name: ⬇️ Install tarpaulin | |
run: cargo install cargo-tarpaulin | |
- name: ⬇️ Run cargo-tarpaulin | |
uses: actions-rs/cargo@v1 | |
with: | |
command: tarpaulin | |
args: --all --all-features --out Xml | |
env: | |
CARGO_INCREMENTAL: 0 | |
- name: ⬆️ Upload to codecov.io | |
uses: codecov/codecov-action@v4.0.1 | |
with: | |
token: ${{secrets.CODECOV_TOKEN}} |