relax-trait-bounds (#56) #208
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: coverage | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- 'README.md' | |
- 'COPYRIGHT' | |
- 'LICENSE*' | |
- '**.md' | |
- '**.txt' | |
- 'art' | |
pull_request: | |
paths-ignore: | |
- 'README.md' | |
- 'COPYRIGHT' | |
- 'LICENSE*' | |
- '**.md' | |
- '**.txt' | |
- 'art' | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
coverage-report: | |
name: Generate Coverage for ${{ matrix.crate }}-${{ matrix.name }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- crate: core | |
features: "test,metrics" | |
name: "memberlist-core" | |
- crate: types | |
features: "metrics,encryption" | |
name: "memberlist-types" | |
- crate: memberlist | |
features: "test,tokio,tcp,compression,encryption,metrics" | |
name: "memberlist-tcp-compression-encryption" | |
- crate: memberlist | |
features: "test,tokio,tls,compression,encryption,metrics" | |
name: "memberlist-tls-compression-encryption" | |
- crate: memberlist | |
features: "test,tokio,native-tls,compression,encryption,metrics" | |
name: "memberlist-native-tls-compression-encryption" | |
- crate: memberlist | |
features: "test,tokio,tcp,compression,metrics" | |
name: "memberlist-tcp-compression-only" | |
- crate: memberlist | |
features: "test,tokio,tls,compression,metrics" | |
name: "memberlist-tls-compression-only" | |
- crate: memberlist | |
features: "test,tokio,native-tls,compression,metrics" | |
name: "memberlist-native-tls-compression-only" | |
- crate: memberlist | |
features: "test,tokio,tcp,encryption,metrics" | |
name: "memberlist-tcp-encryption-only" | |
- crate: memberlist | |
features: "test,tokio,tls,compression,metrics" | |
name: "memberlist-tls-encryption-only" | |
- crate: memberlist | |
features: "test,tokio,native-tls,encryption,metrics" | |
name: "memberlist-native-tls-encryption-only" | |
- crate: memberlist | |
features: "test,tokio,tcp,metrics" | |
name: "memberlist-tcp" | |
- crate: memberlist | |
features: "test,tokio,tls,metrics" | |
name: "memberlist-tls" | |
- crate: memberlist | |
features: "test,tokio,native-tls,metrics" | |
name: "memberlist-native-tls" | |
- crate: memberlist | |
features: "test,tokio,quinn,compression,metrics" | |
name: "memberlist-quinn-compression" | |
- crate: memberlist | |
features: "test,tokio,quinn,metrics" | |
name: "memberlist-quinn" | |
- crate: transports/net | |
features: "test,tokio,tcp,compression,metrics" | |
name: "net-tcp-compression-only" | |
- crate: transports/net | |
features: "test,tokio,tcp,encryption,metrics" | |
name: "net-tcp-encryption-only" | |
- crate: transports/net | |
features: "test,tokio,tcp,metrics" | |
name: "net-tcp" | |
- crate: transports/net | |
features: "test,tokio,tcp,compression,encryption,metrics" | |
name: "net-tcp-compression-and-encryption" | |
- crate: transports/net | |
features: "test,tokio,tls,compression,encryption,metrics" | |
name: "net-tls" | |
- crate: transports/net | |
features: "test,tokio,native-tls,compression,encryption,metrics" | |
name: "net-native-tls" | |
- crate: transports/quic | |
features: "test,tokio,quinn,compression,metrics" | |
name: "quic-quinn" | |
- crate: transports/quic | |
features: "test,tokio,s2n,compression,metrics" | |
name: "quic-s2n" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install latest nightly | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
- name: Setup loopback interface | |
run: ci/setup_subnet_ubuntu.sh | |
- name: Install cargo-tarpaulin | |
run: cargo install cargo-tarpaulin | |
- name: Run Coverage and Generate Report | |
run: | | |
cargo tarpaulin --out xml --no-default-features --features ${{ matrix.features }} --no-fail-fast --output-dir $PWD -j 1 | |
working-directory: ${{ matrix.crate }} | |
continue-on-error: true | |
- name: Upload Coverage Report as Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.name }} | |
path: ${{ matrix.crate }}/cobertura.xml | |
upload-codecov: | |
needs: coverage-report | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download all coverage reports | |
uses: actions/download-artifact@v4 | |
with: | |
path: reports/ | |
- name: List contents of the reports directory | |
run: ls -a reports | |
- name: Upload to codecov.io | |
uses: codecov/codecov-action@v5 | |
with: | |
directory: reports | |
fail_ci_if_error: false | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |