generated from lucas/rust-template
Add CI workflow
This commit is contained in:
parent
c73f26bd67
commit
2f5754a9eb
1 changed files with 27 additions and 0 deletions
27
.forgejo/workflows/check.yaml
Normal file
27
.forgejo/workflows/check.yaml
Normal file
|
@ -0,0 +1,27 @@
|
|||
name: check
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request_target:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: docker
|
||||
steps:
|
||||
- uses: https://code.forgejo.org/actions/checkout@v4
|
||||
- uses: https://github.com/actions-rust-lang/setup-rust-toolchain@fb51252c7ba57d633bc668f941da052e410add48
|
||||
- name: clippy
|
||||
run: cargo build
|
||||
|
||||
check:
|
||||
runs-on: docker
|
||||
steps:
|
||||
- uses: https://code.forgejo.org/actions/checkout@v4
|
||||
- uses: https://github.com/actions-rust-lang/setup-rust-toolchain@fb51252c7ba57d633bc668f941da052e410add48
|
||||
with:
|
||||
components: clippy, rustfmt
|
||||
- name: clippy
|
||||
run: cargo clippy -- -D warnings
|
||||
- name: rustfmt
|
||||
run: cargo fmt --all -- --check
|
Loading…
Add table
Add a link
Reference in a new issue