Merge pull request #334 from Kuadrant/ttl_expiry #71
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' | |
jobs: | |
check: | |
name: Check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- uses: abelfodil/protoc-action@v1 | |
with: | |
protoc-version: '3.19.4' | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
test: | |
name: Test Suite | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: supercharge/redis-github-action@1.1.0 | |
with: | |
redis-version: 7 | |
# Nightly is required for code coverage with doctests | |
# https://github.com/taiki-e/cargo-llvm-cov/issues/2 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: nightly | |
- uses: abelfodil/protoc-action@v1 | |
with: | |
protoc-version: '3.19.4' | |
- name: Install cargo-llvm-cov | |
uses: taiki-e/install-action@cargo-llvm-cov | |
- name: Test and Generate code coverage | |
run: cargo +nightly llvm-cov --all-features --workspace --lcov --doctests --output-path lcov.info | |
- name: Codecov | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
if: env.CODECOV_TOKEN != null | |
uses: codecov/codecov-action@v3 | |
with: | |
verbose: true | |
fail_ci_if_error: false |