mirror of
https://github.com/rustfs/rustfs.git
synced 2026-01-17 01:30:33 +00:00
ci: fix basic checks
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
name: Rust
|
||||
name: CI
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
branches:
|
||||
- main
|
||||
schedule:
|
||||
- cron: '0 0 * * 0' # at midnight of each sunday
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
@@ -24,19 +30,12 @@ jobs:
|
||||
cancel_others: true
|
||||
paths_ignore: '["*.md"]'
|
||||
|
||||
build:
|
||||
# See this url if required matrix jobs are hanging
|
||||
# https://github.com/fkirc/skip-duplicate-actions#how-to-use-skip-check-with-required-matrix-jobs
|
||||
develop:
|
||||
needs: skip-check
|
||||
if: needs.skip-check.outputs.should_skip != 'true'
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
rust:
|
||||
- stable
|
||||
- nightly
|
||||
|
||||
|
||||
steps:
|
||||
- uses: arduino/setup-protoc@v3
|
||||
with:
|
||||
@@ -48,22 +47,21 @@ jobs:
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: toolchain
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
- uses: dtolnay/rust-toolchain@nightly
|
||||
with:
|
||||
toolchain: ${{ matrix.rust }}
|
||||
components: rustfmt, clippy
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
cache-on-failure: true
|
||||
|
||||
- name: cargo fmt
|
||||
|
||||
- name: format
|
||||
run: cargo fmt --all --check
|
||||
|
||||
- name: cargo clippy
|
||||
run: cargo clippy
|
||||
|
||||
- name: lint
|
||||
run: cargo check
|
||||
# run: cargo clippy
|
||||
# run: cargo clippy -- -D warnings
|
||||
|
||||
- name: cargo test
|
||||
- name: test
|
||||
run: cargo test --all --exclude e2e_test
|
||||
Reference in New Issue
Block a user