Skip to content

fix(hover): support anonymous nodes after MISSING (#255) #18

fix(hover): support anonymous nodes after MISSING (#255)

fix(hover): support anonymous nodes after MISSING (#255) #18

Workflow file for this run

name: CI
on:
push:
branches: ['master']
pull_request:
branches: ['master']
permissions:
contents: read
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@1.88.0
id: toolchain
with:
components: clippy
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-debug-${{ hashFiles('**/Cargo.lock') }}
- run: cargo clippy --tests --no-deps -- -D warnings
format:
name: Format
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@1.88.0
id: toolchain
with:
components: rustfmt
- run: cargo fmt --check
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@1.88.0
id: toolchain
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-debug-${{ hashFiles('**/Cargo.lock') }}
- run: cargo test
corpus:
name: Corpus test
runs-on: ubuntu-latest
timeout-minutes: 10
env:
NVIM_TS_DIR: .test/nvim-treesitter
steps:
- uses: actions/checkout@v4
- uses: tree-sitter/setup-action/cli@v2
with:
install-lib: false
- uses: dtolnay/rust-toolchain@1.88.0
id: toolchain
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-release-${{ hashFiles('**/Cargo.lock') }}
- name: Compile
run: |
cargo build --release
echo ${{ github.workspace }}/target/release >> $GITHUB_PATH
- name: Clone nvim-treesitter corpus
uses: actions/checkout@v6
with:
repository: nvim-treesitter/nvim-treesitter
ref: main
path: ${{ env.NVIM_TS_DIR }}
- name: Setup parsers cache
id: parsers-cache
uses: actions/cache@v4
with:
path: ~/.local/share/nvim/site/parser/
key: parsers-${{ hashFiles('**/lua/nvim-treesitter/parsers.lua') }}
- name: Compile parsers
if: steps.parsers-cache.outputs.cache-hit != 'true'
working-directory: ${{ env.NVIM_TS_DIR }}
run: |
bash ./scripts/ci-install.sh
nvim -l ./scripts/install-parsers.lua --max-jobs=10
- name: Check corpus
working-directory: ${{ env.NVIM_TS_DIR }}
run: ts_query_ls check runtime/queries
- name: Format corpus
working-directory: ${{ env.NVIM_TS_DIR }}
run: |
ts_query_ls format runtime/queries
git diff --exit-code
generate-schema:
name: Generate schema
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@1.88.0
id: toolchain
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-debug-${{ hashFiles('**/Cargo.lock') }}
- name: Check schema generation
run: |
# Generate schema
cargo xtask schema
# Check for uncommitted changes
if [[ -n "$(git status --porcelain)" ]]; then
echo '❌ Uncommitted changes detected after running `cargo xtask schema`:'
git --no-pager diff
exit 1
else
echo "✅ No changes; schema is up to date."
fi