Skip to content

Merge pull request #401 from Kuadrant/gh_action #111

Merge pull request #401 from Kuadrant/gh_action

Merge pull request #401 from Kuadrant/gh_action #111

Workflow file for this run

---
name: Coverage
on:
push:
branches:
- 'main'
jobs:
check:
name: Check
if: github.repository == 'Kuadrant/limitador'
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
if: github.repository == 'Kuadrant/limitador'
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