Skip to content

test: implement repository-wide unit tests #1

test: implement repository-wide unit tests

test: implement repository-wide unit tests #1

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
CARGO_TERM_COLOR: always
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo
~/.rustup/toolchains
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Install Rust
run: |
rustup toolchain install stable
rustup component add rustfmt clippy
- uses: Swatinem/rust-cache@v2
build:
runs-on: ubuntu-latest
needs: ci
steps:
- name: Build
run: cargo build --verbose
- name: Clippy
run: cargo clippy --verbose -- -D warnings
- name: Tests
run: cargo test --verbose
- name: Fmt
run: cargo fmt -- --check
coverage:
runs-on: ubuntu-latest
needs: setup

Check failure on line 58 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yml (Line: 58, Col: 12): Job 'coverage' depends on unknown job 'setup'.
steps:
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- 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@v4
with:
files: lcov.info
fail_ci_if_error: true