add workflows

This commit is contained in:
Jonas Kruckenberg
2022-12-14 20:14:55 +01:00
parent 06663c65bf
commit 5600179000
6 changed files with 238 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
name: Format Rust
on:
push:
branches:
- main
paths:
- '.github/workflows/format-rust.yml'
- 'src/**'
pull_request:
branches:
- main
paths:
- '.github/workflows/format-rust.yml'
- 'src/**'
jobs:
format:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Install rustfmt with nightly toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --manifest-path=Cargo.toml --all -- --check