adjust PR workflow and fix tests #3
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
name: PR | |
on: | |
pull_request: | |
paths-ignore: | |
- 'README.md' | |
permissions: | |
contents: read | |
jobs: | |
test: | |
name: test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- 1.66.1 # MSRV | |
- stable | |
- beta | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
- name: Run tests | |
run: cargo test | |
test-no-ts: | |
name: test without tree-sitter | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Run tests without tree-sitter | |
run: cargo test --no-default-features | |
bench: | |
name: bench | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: nightly | |
- name: Run dogfooding benchmarks | |
run: cargo bench | |
coverage: | |
name: coverage | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: stable | |
- uses: taiki-e/install-action@v2 | |
with: | |
tool: cargo-llvm-cov | |
- name: Generate code coverage | |
run: cargo llvm-cov --lcov --output-path lcov.info | |
- name: Upload to Coveralls | |
uses: coverallsapp/github-action@v2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
lint: | |
name: fmt & lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
components: rustfmt, clippy | |
- name: Rustfmt Check | |
run: cargo fmt --check --all | |
- name: Clippy check | |
run: cargo clippy |