Skip to content

Merge pull request #405 from Kuadrant/402-fix-gh-actions-to-work-on-f… #112

Merge pull request #405 from Kuadrant/402-fix-gh-actions-to-work-on-f…

Merge pull request #405 from Kuadrant/402-fix-gh-actions-to-work-on-f… #112

Workflow file for this run

---
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: Swatinem/rust-cache@v2
- 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/[email protected]
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: Swatinem/rust-cache@v2
- 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