test: Testing tree-sitter queries
#292
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| profile: minimal | |
| override: true | |
| - name: Install nextest | |
| uses: taiki-e/install-action@nextest | |
| - name: Run tests | |
| run: cargo nextest run | |
| - name: Check for snapshot changes | |
| run: | | |
| if git status --porcelain tests/languages | grep -q "snapshots/"; then | |
| echo "Error: Snapshot files have changed. Run 'cargo insta review' locally and commit the changes." | |
| git diff -- tests/languages/*/snapshots | |
| exit 1 | |
| fi |