Skip to content

Merge pull request #3 from valorem-labs-inc/megsdevs/val-727-shared-a… #9

Merge pull request #3 from valorem-labs-inc/megsdevs/val-727-shared-a…

Merge pull request #3 from valorem-labs-inc/megsdevs/val-727-shared-a… #9

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
types: [ opened, synchronize, reopened ]
branches:
- main
env:
CARGO_TERM_COLOR: always
jobs:
tests:
name: Run tests with coverage
runs-on:
labels: ubuntu-latest
services:
redis:
image: redis:7
ports:
- 6379:6379
env:
CARGO_TERM_COLOR: always
LLVMCOV_VERSION: 0.5.14
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: 'true'
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
override: true
profile: minimal
components: clippy, rustfmt
- name: Cache rust dependencies
uses: Swatinem/rust-cache@v2
- name: Install cargo-llvm-cov
run: cargo install cargo-llvm-cov --version=${{ env.LLVMCOV_VERSION }} --locked
- name: Check Formatting
run: cargo fmt --all -- --check
- name: Check With Clippy
run: cargo clippy --all --all-targets --all-features -- -D warnings
- name: Docs
run: cargo doc --no-deps
- name: Generate code coverage
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: lcov.info
fail_ci_if_error: false