Files
codeql/.github/workflows/tree-sitter-extractor-test.yml
Paolo Tranquilli 1d9a9fef76 CI: fix rust formatting
`cargo fmt --all` should be avoided in CI as that will include `rust/ast-generator`
which has sources provided by bazel (`bazel run //rust/ast-generator:inject_sources`
can provide those sources in-tree).

Now the formatting checks are limited to the sources that trigger the jobs, and a
check is added to `rust/ast-generator`.
2024-12-19 12:01:53 +01:00

50 lines
1.0 KiB
YAML

name: Test tree-sitter-extractor
on:
push:
paths:
- "shared/tree-sitter-extractor/**"
- .github/workflows/tree-sitter-extractor-test.yml
branches:
- main
- "rc/*"
pull_request:
paths:
- "shared/tree-sitter-extractor/**"
- .github/workflows/tree-sitter-extractor-test.yml
branches:
- main
- "rc/*"
env:
CARGO_TERM_COLOR: always
defaults:
run:
working-directory: shared/tree-sitter-extractor
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check formatting
run: cargo fmt -- --check
- name: Run tests
run: cargo test --verbose
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check formatting
run: cargo fmt --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run clippy
run: cargo clippy -- --no-deps -D warnings -A clippy::new_without_default -A clippy::too_many_arguments