Skip to content

fix clippy errors (#31) #101

fix clippy errors (#31)

fix clippy errors (#31) #101

Workflow file for this run

name: CI
on:
push:
branches: [ "main" ]
tags: [ "v*" ]
pull_request:
branches: [ "main" ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
RUST_BACKTRACE: 1
NIGHTLY_VERSION: nightly-2023-03-19
jobs:
##########################
# Linting and formatting #
##########################
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
components: clippy
- run: cargo clippy --workspace -- -D warnings
rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: $NIGHTLY_VERSION
components: rustfmt
- run: cargo +$NIGHTLY_VERSION fmt --all -- --check
###########
# Testing #
###########
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
- run: cargo test --workspace
env:
# fix rustdoc issue with macros
CARGO_TARGET_TMPDIR: ""
#################
# Documentation #
#################
rustdoc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: $NIGHTLY_VERSION
- run: cargo +$NIGHTLY_VERSION doc --workspace --no-deps
env:
RUSTDOCFLAGS: --cfg docsrs