mirror of
https://github.com/rustfs/rustfs.git
synced 2026-09-05 19:55:37 +00:00
cc1ec6b992
* fix(ci): share quick checks and lint workflows * fix(ci): install actionlint from its verified release * fix(ci): reject dependencies on required quick checks
116 lines
3.7 KiB
YAML
116 lines
3.7 KiB
YAML
# Copyright 2024 RustFS Team
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
name: Quick Checks
|
|
description: Run the shared compile-free RustFS quality checks.
|
|
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Install quality tools
|
|
uses: taiki-e/install-action@bffeee26d4db9be238a4ea78d8826604ebcb594d # v2
|
|
with:
|
|
tool: |
|
|
ripgrep@15.2.0
|
|
shellcheck@0.11.0
|
|
|
|
- name: Install actionlint
|
|
shell: bash
|
|
run: |
|
|
actionlint_dir="$(mktemp -d "${RUNNER_TEMP}/actionlint.XXXXXX")"
|
|
curl --fail --location --silent --show-error \
|
|
--output "$actionlint_dir/actionlint.tar.gz" \
|
|
https://github.com/rhysd/actionlint/releases/download/v1.7.12/actionlint_1.7.12_linux_amd64.tar.gz
|
|
echo "8aca8db96f1b94770f1b0d72b6dddcb1ebb8123cb3712530b08cc387b349a3d8 $actionlint_dir/actionlint.tar.gz" | sha256sum --check --status
|
|
tar -xzf "$actionlint_dir/actionlint.tar.gz" -C "$actionlint_dir" actionlint
|
|
rm "$actionlint_dir/actionlint.tar.gz"
|
|
echo "$actionlint_dir" >> "$GITHUB_PATH"
|
|
|
|
- name: Install Rust toolchain
|
|
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
|
|
with:
|
|
components: rustfmt
|
|
|
|
- name: Check workflow syntax and shell scripts
|
|
shell: bash
|
|
run: shellcheck --version && actionlint
|
|
|
|
- name: Check code formatting
|
|
shell: bash
|
|
run: cargo fmt --all --check
|
|
|
|
- name: Check unsafe code allowances
|
|
shell: bash
|
|
run: ./scripts/check_unsafe_code_allowances.sh
|
|
|
|
- name: Check layered dependencies
|
|
shell: bash
|
|
run: ./scripts/check_layer_dependencies.sh
|
|
|
|
- name: Check architecture migration rules
|
|
shell: bash
|
|
run: ./scripts/check_architecture_migration_rules.sh
|
|
|
|
- name: Check logging guardrails
|
|
shell: bash
|
|
run: ./scripts/check_logging_guardrails.sh
|
|
|
|
- name: Check error other(format!) ratchet
|
|
shell: bash
|
|
run: ./scripts/check_error_other_format_ratchet.sh
|
|
|
|
- name: Check tokio io-uring feature guard
|
|
shell: bash
|
|
run: ./scripts/check_no_tokio_io_uring.sh
|
|
|
|
- name: Check extension schema boundaries
|
|
shell: bash
|
|
run: ./scripts/check_extension_schema_boundaries.sh
|
|
|
|
- name: Check body-cache whitelist guard
|
|
shell: bash
|
|
run: ./scripts/check_body_cache_whitelist.sh
|
|
|
|
- name: Check s3s footprint ratchet
|
|
shell: bash
|
|
run: ./scripts/check_s3s_footprint.sh
|
|
|
|
- name: Check cryptographic capability wording
|
|
shell: bash
|
|
run: ./scripts/check_fips_wording.sh
|
|
|
|
- name: Check no embedded secret material
|
|
shell: bash
|
|
run: ./scripts/check_embedded_secrets.sh
|
|
|
|
- name: Check test wiring
|
|
shell: bash
|
|
run: |
|
|
python3 ./scripts/check_test_wiring.py --self-test
|
|
python3 ./scripts/check_scheduled_validation_freshness.py --self-test
|
|
python3 ./scripts/test_security_workflow.py
|
|
python3 ./scripts/check_test_wiring.py
|
|
|
|
- name: Check no planning docs committed
|
|
shell: bash
|
|
run: ./scripts/check_no_planning_docs.sh
|
|
|
|
- name: Check CI paths stay in sync
|
|
shell: bash
|
|
run: ./scripts/check_ci_paths_sync.sh
|
|
|
|
- name: Check io_uring lane --lib precondition
|
|
shell: bash
|
|
run: ./scripts/check_uring_lane_lib_only.sh
|