Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Misc improvements, i.e. renaming #37

Misc improvements, i.e. renaming

Misc improvements, i.e. renaming #37

Workflow file for this run

# Testing CI - Runs on each PR and Push
name: Test
on:
pull_request:
push:
branches:
- main
permissions:
id-token: write
contents: read
env:
CARGO_TERM_COLOR: always
RUST_TOOLCHAIN: nightly-2024-01-11
RUST_COMPONENTS: "rust-std"
jobs:
# cargo fmt check
check-formatting:
runs-on: ubuntu-latest
steps:
- uses: RDXWorks-actions/checkout@main
- name: Install Rust Toolchain
uses: RDXWorks-actions/toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
default: true
components: rustfmt
- name: Check formatting
run: cargo fmt --check
# clippy
check-clippy:
runs-on: ubuntu-latest
steps:
- uses: RDXWorks-actions/checkout@main
- name: Install Rust Toolchain
uses: RDXWorks-actions/toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
default: true
components: clippy
- name: Clippy Check
run: cargo clippy --all
# Rust unit, doc and integration
test-rust:
runs-on: ubuntu-latest
steps:
- uses: RDXWorks-actions/checkout@main
- name: Install Rust Toolchain
uses: RDXWorks-actions/toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
default: true
- name: Run rust tests
run: cargo test
# Code Coverage uses Tarpaulin and uploads to CodeCov.io
code-coverage:
runs-on: ubuntu-latest
steps:
- uses: RDXWorks-actions/checkout@main
- name: Install Rust Toolchain
uses: RDXWorks-actions/toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
default: true
- name: Install cargo tarpaulin
uses: RDXWorks-actions/cargo-install@main
with:
crate: cargo-tarpaulin
tag: 0.30.0
locked: true
- name: Code Coverage - Generate
run: cargo tarpaulin --out xml
- name: Code Coverage - Upload to CodeCov.io
uses: RDXWorks-actions/codecov-action@main
with:
token: ${{ secrets.CODECOV }}
fail_ci_if_error: true