mirror of
https://github.com/Cyrix126/gupaxx.git
synced 2024-12-22 22:59:27 +00:00
feat: add CI for audit,fmt,test separated from build
This commit is contained in:
parent
800e36345a
commit
5c47849875
3 changed files with 81 additions and 2 deletions
34
.github/workflows/audit.yml
vendored
Normal file
34
.github/workflows/audit.yml
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
# This runs `cargo audit` on all dependencies (only if Cargo deps changed)
|
||||
|
||||
name: Audit
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '**/Cargo.toml'
|
||||
- '**/Cargo.lock'
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
audit:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Cache
|
||||
uses: actions/cache@v3.2.3
|
||||
with:
|
||||
path: |
|
||||
~/.cargo
|
||||
target
|
||||
key: audit
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Install dependencies
|
||||
run: cargo install cargo-audit --locked
|
||||
- name: Audit
|
||||
run: cargo audit
|
||||
|
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -44,8 +44,6 @@ jobs:
|
|||
fi
|
||||
shell: bash
|
||||
|
||||
- name: Test
|
||||
run: cargo test --release
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
|
|
47
.github/workflows/rust.yml
vendored
Normal file
47
.github/workflows/rust.yml
vendored
Normal file
|
@ -0,0 +1,47 @@
|
|||
name: Rust
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
fmt:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Format
|
||||
run: cargo fmt --all --check
|
||||
- name: Test
|
||||
run: cargo test
|
||||
# Run typo checker separately.
|
||||
# This will fast-cancel other CI early if this fails.
|
||||
typo:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Spell Check
|
||||
uses: crate-ci/typos@master
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macos-latest, ubuntu-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Clippy (fail on warnings)
|
||||
run: cargo clippy --workspace --all-features --all-targets -- -D warnings
|
||||
- name: Check compilation
|
||||
run: cargo check --all-features --verbose
|
||||
- name: Tests
|
||||
run: cargo test --all-features
|
||||
- name: Documentation
|
||||
run: cargo doc --workspace --all-features --no-deps
|
Loading…
Reference in a new issue