Review result reaction #293
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2024 The Drasi Authors. | |
# | |
# 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: Run lint checks | |
on: | |
push: | |
branches: ['*'] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
lint_check: | |
name: Cargo Clippy lint check | |
env: | |
# Set RUSTFLAGS for Clippy linting | |
# RUSTFLAGS: | | |
# -Dwarnings # Treat warnings as errors | |
# -W clippy::print_stdout # Warn on use of 'print' and 'println!' | |
# -A unused # Allow unused code (false positive occurences in query-perf) | |
# -A clippy::module_inception # Allow module inception (module with same name as the file) | |
# -A clippy::ptr_arg # Allow passing references as function parameters | |
# -A clippy::type_complexity # Allow complex types without warning | |
RUSTFLAGS: | | |
-Dwarnings | |
-W clippy::print_stdout | |
-A unused | |
-A clippy::module_inception | |
-A clippy::ptr_arg | |
-A clippy::type_complexity | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
submodules: true | |
- name: Install specific Rust version | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: 1.83.0 # Pin to a specific Rust version | |
override: true | |
- name: Install Clippy | |
run: rustup component add clippy rustfmt | |
- name: Install protobuf-compiler | |
run: sudo apt-get install -y protobuf-compiler | |
# Cache Cargo dependencies | |
- name: Cache Cargo registry | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-cargo- | |
- name: Lint check | |
run: make lint-check |