Towards a more permissive grammar #208
Workflow file for this run
This file contains hidden or 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
name: Lint Evaluator | |
on: | |
push: | |
branches: main | |
pull_request: | |
permissions: | |
contents: read | |
checks: write | |
# If new code is pushed to a PR branch, then cancel in progress workflows for that PR. | |
# Ensures that we don't waste CI time, and returns results quicker. | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
env: | |
CARGO_INCREMENTAL: 0 | |
CARGO_TERM_COLOR: always | |
CARGO_PROFILE_DEV_DEBUG: 1 | |
CARGO_PROFILE_RELEASE_DEBUG: 1 | |
RUST_BACKTRACE: short | |
CARGO_NET_RETRY: 10 | |
RUSTUP_MAX_RETRIES: 10 | |
RUSTFLAGS: "-Dwarnings" | |
defaults: | |
run: | |
working-directory: ./evaluator | |
jobs: | |
changes: | |
name: Detect changes | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: read | |
outputs: | |
evaluator: ${{ steps.filter.outputs.evaluator }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
filters: | | |
evaluator: | |
- 'evaluator/**' | |
fmt: | |
name: Formatting | |
needs: changes | |
if: ${{ needs.changes.outputs.evaluator == 'true' || github.ref == 'refs/heads/main' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Rust toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
components: rustfmt | |
working-directory: ./evaluator | |
- name: Check formatting | |
uses: actions-rust-lang/rustfmt@v1 | |
with: | |
manifest-path: ./evaluator/Cargo.toml | |
working-directory: ./evaluator | |
clippy: | |
name: Clippy | |
needs: changes | |
if: ${{ needs.changes.outputs.evaluator == 'true' || github.ref == 'refs/heads/main' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Rust toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
components: clippy | |
working-directory: ./evaluator | |
- name: Run clippy | |
uses: auguwu/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
working-directory: ./evaluator | |
# doc: | |
# name: Doc | |
# runs-on: ubuntu-latest | |
# env: | |
# RUSTDOCFLAGS: -Dwarnings | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - name: Setup Rust toolchain | |
# uses: actions-rust-lang/setup-rust-toolchain@v1 | |
# with: | |
# # Run docs generation on nightly rather than stable. This enables features like | |
# # https://doc.rust-lang.org/beta/unstable-book/language-features/doc-cfg.html which allows an | |
# # API be documented as only available in some specific platforms. | |
# toolchain: nightly | |
# - name: Install cargo-docs-rs | |
# uses: dtolnay/install@cargo-docs-rs | |
# - name: Generate documentation | |
# run: cargo docs-rs |