fix: range containment check (e.g. weird @parameter.inner behavior) #126
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: Tests | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| pull_request: | |
| branches: | |
| - 'main' | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-build-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| check_compilation: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest] | |
| nvim_tag: [nightly] | |
| name: ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| NVIM_TS_DIR: .test-deps/nvim-treesitter | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: tree-sitter/setup-action/cli@v2 | |
| - uses: ilammy/msvc-dev-cmd@v1 | |
| - name: Install and prepare Neovim | |
| env: | |
| NVIM_TAG: ${{ matrix.nvim_tag }} | |
| run: | | |
| bash ./scripts/ci-install.sh | |
| - name: Install nvim-treesitter | |
| 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('.test-deps/nvim-treesitter/lua/nvim-treesitter/parsers.lua') }} | |
| - name: Compile parsers | |
| if: steps.parsers-cache.outputs.cache-hit != 'true' | |
| working-directory: ${{ env.NVIM_TS_DIR }} | |
| run: nvim -l ./scripts/install-parsers.lua --max-jobs=10 | |
| - name: Lint docs | |
| run: | | |
| make docs | |
| if ! git diff --quiet; then | |
| echo "::group::Docs diff" | |
| git status --short | |
| git diff | |
| echo "::endgroup::" | |
| changed_files=$(git diff --name-only) | |
| { | |
| echo "## Documentation needs to be updated" | |
| echo | |
| echo "CI regenerated documentation and found differences with what is committed." | |
| echo | |
| echo "You do **not** need to run \`make docs\` locally." | |
| echo | |
| echo "### How to fix this" | |
| echo "1. Go to the **Summary** tab in this workflow run." | |
| echo "2. Copy the updated content." | |
| echo "3. Paste it into the corresponding file in your branch." | |
| echo "4. Commit and push the changes." | |
| echo | |
| echo "### Generated content" | |
| for f in $changed_files; do | |
| echo | |
| echo "#### \`$f\`" | |
| echo | |
| echo '```' | |
| cat "$f" | |
| echo '```' | |
| done | |
| echo | |
| echo "### Git diff (patch-style)" | |
| echo | |
| echo "You can also apply these changes using a patch:" | |
| echo | |
| echo '```diff' | |
| git diff | |
| echo '```' | |
| } >> "$GITHUB_STEP_SUMMARY" | |
| echo "::error::Documentation is out of date. Copy the generated docs from the job summary into your branch and commit them." | |
| exit 1 | |
| fi | |
| - name: Check queries | |
| if: ${{ always() }} | |
| run: make checkquery | |
| - name: Run tests | |
| if: ${{ always() }} | |
| run: make tests |