bad codecov #60
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: CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
RUSTC_WRAPPER: sccache | |
SCCACHE_GHA_ENABLED: "on" | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: taiki-e/install-action@cargo-binstall | |
- name: Install Dependencies | |
run: | | |
rustup component add rustfmt llvm-tools-preview clippy | |
cargo binstall -y --no-symlinks cargo-llvm-cov cargo-nextest cargo-sort cargo-audit cargo-machete | |
wget https://github.com/mozilla/sccache/releases/download/v0.7.5/sccache-v0.7.5-x86_64-unknown-linux-musl.tar.gz | |
mkdir sccache-install && tar -xzf sccache-v0.7.5-x86_64-unknown-linux-musl.tar.gz -C sccache-install --strip-components=1 | |
mv sccache-install/sccache /usr/local/bin && rm -rf sccache-install/ | |
- name: Configure sccache | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); | |
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); | |
- name: Basic check | |
run: | | |
cargo audit | |
cargo fmt --all -- --check | |
cargo sort --check | |
cargo machete | |
- name: Sscache clear | |
run: sccache --zero-stats > /dev/null | |
- name: Run test with codecov | |
run: cargo llvm-cov --no-report nextest --all-features | |
- name: Run example with codecov | |
run: | | |
cargo llvm-cov --no-report run --example proxy | |
- name: Run bench with codecov | |
run: | | |
cargo llvm-cov --no-report --bench micro --features="micro-bench" | |
- name: Generate codecov report | |
run: | | |
cargo llvm-cov report --lcov --output-path lcov.info | |
- name: Sscache state | |
run: sccache --show-stats | |
- uses: codecov/codecov-action@v4 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
verbose: true |