Basic Rust CI
This commit is contained in:
parent
c5a0d19494
commit
2dfaa8d428
30
.github/workflows/code-quality.yml
vendored
Normal file
30
.github/workflows/code-quality.yml
vendored
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
name: code-quality
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches: [ "main" ]
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
format:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Installing Rust toolchain
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
components: rustfmt, clippy
|
||||||
|
|
||||||
|
- name: Format
|
||||||
|
run: cargo fmt --check
|
||||||
|
|
||||||
|
- name: Lint
|
||||||
|
run: cargo clippy
|
||||||
|
|
||||||
|
- name: Tests
|
||||||
|
run: cargo test
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: cargo build --verbose
|
Loading…
Reference in a new issue