Merge pull request #7 from PFC-Validator/fix/scv-audit #79
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 | |
on: push | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Install Just | |
uses: extractions/setup-just@v1 | |
- name: Install toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
- name: Run tests | |
run: just test | |
env: | |
RUST_BACKTRACE: 1 | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Install Just | |
uses: extractions/setup-just@v1 | |
- name: Install toolchain | |
uses: dtolnay/rust-toolchain@nightly | |
with: | |
# nightly is failing for some weird reason | |
toolchain: nightly | |
components: clippy | |
- name: Run linter | |
run: just clippy | |
env: | |
RUST_BACKTRACE: 1 | |
coverage: | |
name: coverage | |
runs-on: ubuntu-latest | |
container: | |
image: xd009642/tarpaulin:develop-nightly | |
options: --security-opt seccomp=unconfined | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Generate code coverage | |
run: | | |
cargo +nightly tarpaulin --verbose --workspace --timeout 120 --out xml | |
- name: Upload to codecov.io | |
uses: codecov/codecov-action@v2 | |
with: | |
# token: ${{secrets.CODECOV_TOKEN}} # not required for public repos | |
fail_ci_if_error: true |