mirror of
https://github.com/Jackzmc/storage.git
synced 2025-05-05 16:53:20 +00:00
Update rust.yml
This commit is contained in:
parent
efc1f97f80
commit
092e64b05c
1 changed files with 25 additions and 14 deletions
39
.github/workflows/rust.yml
vendored
39
.github/workflows/rust.yml
vendored
|
@ -1,22 +1,33 @@
|
|||
name: Rust
|
||||
|
||||
name: "Rust"
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
name: cargo build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build
|
||||
run: cargo build --verbose
|
||||
- name: Run tests
|
||||
run: cargo test --verbose
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
- run: cargo build --all-features
|
||||
test:
|
||||
name: cargo test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
- run: cargo test --all-features
|
||||
|
||||
# Check formatting with rustfmt
|
||||
formatting:
|
||||
name: cargo fmt
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
# Ensure rustfmt is installed and setup problem matcher
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
components: rustfmt
|
||||
- name: Rustfmt Check
|
||||
uses: actions-rust-lang/rustfmt@v1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue