Skip to content

Cleanup and add more write skew tests #104

Cleanup and add more write skew tests

Cleanup and add more write skew tests #104

Workflow file for this run

name: CI
on:
push:
# Ignore bors branches, since they are covered by `clippy_bors.yml`
branches:
- main
# Don't run Clippy tests, when only textfiles were modified
paths-ignore:
- "README"
- "COPYRIGHT"
- "LICENSE-*"
- "**.md"
- "**.txt"
pull_request:
# Don't run Clippy tests, when only textfiles were modified
paths-ignore:
- "README"
- "COPYRIGHT"
- "LICENSE-*"
- "**.md"
- "**.txt"
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -Dwarnings
RUST_BACKTRACE: 1
nightly: nightly
stable: stable
defaults:
run:
shell: bash
jobs:
# Check formatting
rustfmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust
run: rustup update stable && rustup default stable
- name: Check formatting
run: cargo fmt --all -- --check
# Apply clippy lints
clippy:
name: clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Apply clippy lints
run: cargo clippy --all-features
# Stable
test:
name: test
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
# - windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Install Rust
run: rustup update stable --no-self-update && rustup default stable
- name: Test
run: cargo test --all-features
coverage:
name: cargo tarpaulin
runs-on: ubuntu-latest
needs:
- rustfmt
- clippy
- test
steps:
- uses: actions/checkout@v3
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- uses: actions-rs/install@v0.1
with:
crate: cargo-tarpaulin
version: latest
- name: Cache ~/.cargo
uses: actions/cache@v3
with:
path: ~/.cargo
key: ${{ runner.os }}-coverage-dotcargo
- name: Cache cargo build
uses: actions/cache@v3
with:
path: target
key: ${{ runner.os }}-coverage-cargo-build-target
- name: Install cargo-tarpaulin
run: cargo install cargo-tarpaulin
- name: Run Coverage and Generate Report
run: |
cargo tarpaulin --all-features --out xml --no-fail-fast
continue-on-error: true
- name: Upload to codecov.io
uses: codecov/codecov-action@v3.1.1
with:
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}