ci: add comprehensive formatting and linting setup
- Add formatting commands to justfile (format, fmt_check, clippy_check, fc) - Create GitHub Actions workflows for automated fmt and clippy checks - Fix existing clippy warnings in macro code - Ensure CI enforcement of code quality standards This brings native_model in line with native_db's robust formatting and linting approach.
This commit is contained in:
committed by
Vincent Herlemont
parent
64b1d15dd1
commit
31efa79429
@@ -0,0 +1,30 @@
|
||||
name: Clippy Check
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main, next ]
|
||||
schedule:
|
||||
- cron: '0 23 * * 4'
|
||||
|
||||
env:
|
||||
RUST_BACKTRACE: full
|
||||
|
||||
jobs:
|
||||
clippy_check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- uses: extractions/setup-just@v3
|
||||
- uses: hustcer/setup-nu@v3.19
|
||||
with:
|
||||
version: '0.105.1'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.PAT_GLOBAL }}
|
||||
- name: Just version
|
||||
run: just --version
|
||||
- name: Clippy Check
|
||||
run: just clippy_check
|
||||
@@ -0,0 +1,30 @@
|
||||
name: Fmt Check
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main, next ]
|
||||
schedule:
|
||||
- cron: '0 23 * * 4'
|
||||
|
||||
env:
|
||||
RUST_BACKTRACE: full
|
||||
|
||||
jobs:
|
||||
fmt_check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- uses: extractions/setup-just@v3
|
||||
- uses: hustcer/setup-nu@v3.19
|
||||
with:
|
||||
version: '0.105.1'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.PAT_GLOBAL }}
|
||||
- name: Just version
|
||||
run: just --version
|
||||
- name: Fmt Check
|
||||
run: just fmt_check
|
||||
Reference in New Issue
Block a user