Add CI jobs
This commit is contained in:
parent
a29a40c5c8
commit
cc965e7c0a
1 changed files with 42 additions and 0 deletions
42
.forgejo/workflows/build.yaml
Normal file
42
.forgejo/workflows/build.yaml
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
---
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
formatting:
|
||||||
|
name: Formatting
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Set up Rust
|
||||||
|
uses: https://github.com/dtolnay/rust-toolchain@nightly
|
||||||
|
with:
|
||||||
|
components: rustfmt
|
||||||
|
- name: Check Rust formatting
|
||||||
|
run: cargo fmt --all -- --check
|
||||||
|
|
||||||
|
clippy:
|
||||||
|
name: Clippy
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Set up Rust
|
||||||
|
uses: https://github.com/dtolnay/rust-toolchain@nightly
|
||||||
|
with:
|
||||||
|
components: clippy
|
||||||
|
- name: Run Clippy
|
||||||
|
run: cargo clippy -- -D warnings
|
||||||
|
|
||||||
|
build:
|
||||||
|
name: Build
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- name: Checkout the code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Set up Rust
|
||||||
|
uses: https://github.com/dtolnay/rust-toolchain@nightly
|
||||||
|
- name: Build project
|
||||||
|
run: cargo build
|
Loading…
Add table
Add a link
Reference in a new issue