Add regression test for #86 #444
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: [] | |
pull_request: | |
branches: | |
- main | |
name: Continuous integration | |
jobs: | |
test: | |
name: Test Suite | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: [beta, stable, 1.70.0] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
# Skip cargo update for MSRV validation build | |
- run: cargo update | |
if: ${{ matrix.rust == 'stable' || matrix.rust == 'beta' }} | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v1 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- run: cargo test | |
lints: | |
name: Lints | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- stable | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
component: clippy, rustfmt | |
- run: cargo fmt --all -- --check | |
- run: cargo clippy -- -D warnings | |
- run: cargo check --no-default-features | |
- run: cargo check --all-features | |
coverage: | |
name: Coverage | |
runs-on: ubuntu-latest | |
container: | |
image: xd009642/tarpaulin:develop | |
options: --security-opt seccomp=unconfined | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v1 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Generate code coverage | |
run: | | |
cargo tarpaulin --verbose --timeout 120 --out xml | |
- name: Upload to codecov.io | |
uses: codecov/codecov-action@v4 | |
with: | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} |