Rust CI Development Flow #82
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow is meant to be used by development commits. | |
# It will be triggered automatically on any push to the devel branch. | |
# Manually, can be triggered from any branch, which enables custom development branches to run CI as well. | |
name: Rust CI Development Flow | |
on: | |
push: | |
branches: [ "devel" ] | |
workflow_dispatch: | |
inputs: | |
TEST_LOG: | |
description: 'Enable tracing when running cargo test' | |
required: false | |
default: 'none' | |
type: choice | |
options: | |
- info | |
- debug | |
- none | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
fmt: | |
name: Rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt clippy | |
- name: Enforce formatting | |
run: cargo fmt --check | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt clippy | |
- name: Linting | |
run: cargo clippy --no-deps -- -D warnings | |