mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-27 15:37:02 +00:00
feat: enhance CI with comprehensive clippy checks for pull requests
This commit is contained in:
@@ -19,7 +19,7 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
actions: write
|
actions: write
|
||||||
contents: read
|
contents: read
|
||||||
runs-on: ubuntu-latest
|
runs-on: self-hosted
|
||||||
outputs:
|
outputs:
|
||||||
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
||||||
steps:
|
steps:
|
||||||
@@ -30,10 +30,31 @@ jobs:
|
|||||||
cancel_others: true
|
cancel_others: true
|
||||||
paths_ignore: '["*.md"]'
|
paths_ignore: '["*.md"]'
|
||||||
|
|
||||||
|
# Quality checks for pull requests
|
||||||
|
pr-checks:
|
||||||
|
name: Pull Request Quality Checks
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
|
runs-on: self-hosted
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: ./.github/actions/setup
|
||||||
|
|
||||||
|
- name: Format Check
|
||||||
|
run: cargo fmt --all --check
|
||||||
|
|
||||||
|
- name: Lint Check
|
||||||
|
run: cargo check --all-targets
|
||||||
|
|
||||||
|
- name: Clippy Check
|
||||||
|
run: cargo clippy --all-targets --all-features -- -D warnings
|
||||||
|
|
||||||
|
- name: Unit Tests
|
||||||
|
run: cargo test --all --exclude e2e_test
|
||||||
|
|
||||||
develop:
|
develop:
|
||||||
needs: skip-check
|
needs: skip-check
|
||||||
if: needs.skip-check.outputs.should_skip != 'true'
|
if: needs.skip-check.outputs.should_skip != 'true'
|
||||||
runs-on: ubuntu-latest
|
runs-on: self-hosted
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: ./.github/actions/setup
|
- uses: ./.github/actions/setup
|
||||||
@@ -43,7 +64,9 @@ jobs:
|
|||||||
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
run: cargo check --all-targets
|
run: cargo check --all-targets
|
||||||
# TODO: cargo clippy
|
|
||||||
|
- name: Clippy
|
||||||
|
run: cargo clippy --all-targets --all-features -- -D warnings
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: cargo test --all --exclude e2e_test
|
run: cargo test --all --exclude e2e_test
|
||||||
@@ -69,7 +92,7 @@ jobs:
|
|||||||
- skip-check
|
- skip-check
|
||||||
- develop
|
- develop
|
||||||
if: needs.skip-check.outputs.should_skip != 'true'
|
if: needs.skip-check.outputs.should_skip != 'true'
|
||||||
runs-on: ubuntu-latest
|
runs-on: self-hosted
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
|
|||||||
Reference in New Issue
Block a user