Skip to content

Commit

Permalink
Merge pull request #195 from theseus-rs/update-codecov-action
Browse files Browse the repository at this point in the history
build: update codecov action
  • Loading branch information
brianheineman authored Oct 1, 2024
2 parents 35183a7 + 3e94414 commit fe2ea1c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 20 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@ jobs:
- name: Install cargo audit
run: cargo install cargo-audit
- name: Audit dependencies
run: cargo audit --ignore RUSTSEC-2023-0071 --ignore RUSTSEC-2024-0320
run: |
cargo audit \
--ignore RUSTSEC-2023-0071 \
--ignore RUSTSEC-2023-0086 \
--ignore RUSTSEC-2024-0320 \
--ignore RUSTSEC-2024-0370 \
--ignore RUSTSEC-2024-0376
check:
runs-on: ubuntu-22.04
Expand Down
31 changes: 12 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

include:
- platform: linux-x64
os: ubuntu-22.04
os: ubuntu-24.04
- platform: macos-arm64
os: macos-14
- platform: macos-x64
Expand All @@ -46,46 +46,39 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
components: 'llvm-tools-preview'
toolchain: stable

# aws-lc-rs requires nasm: https://github.com/rustls/rustls/issues/1913
- name: Install NASM
if: ${{ startsWith(matrix.os, 'windows-') }}
uses: ilammy/setup-nasm@v1

- name: Install grcov
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@main
with:
tool: grcov
tool: cargo-llvm-cov

- name: Tests
if: ${{ !startsWith(matrix.os, 'ubuntu-') }}
env:
CARGO_TERM_COLOR: always
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
LLVM_PROFILE_FILE: rsql-%p-%m.profraw
RUST_BACKTRACE: 1
RUST_LOG: "info"
RUST_LOG_SPAN_EVENTS: full
RUSTFLAGS: -Cinstrument-coverage
RUSTDOCFLAGS: -Cinstrument-coverage
run: |
cargo test --workspace --features all
- name: Produce coverage info
- name: Tests
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
env:
CARGO_TERM_COLOR: always
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
RUST_BACKTRACE: 1
RUST_LOG: "info"
RUST_LOG_SPAN_EVENTS: full
run: |
grcov $(find . -name "rsql-*.profraw" -print) \
-s . \
--branch \
--ignore-not-existing \
--ignore='target/*' \
--ignore='benches/*' \
--ignore='/*' \
--binary-path ./target/debug/ \
--excl-line='#\[derive' \
-t lcov \
-o lcov.info
cargo llvm-cov --workspace --lcov --output-path lcov.info
- name: Upload to codecov.io
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
Expand Down

0 comments on commit fe2ea1c

Please sign in to comment.