mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-02 11:36:54 -04:00
fix tests
disable Windows tests for now (hang on parser compile)
This commit is contained in:
parent
7681249bbd
commit
008cc677d2
12 changed files with 73 additions and 65 deletions
48
.github/workflows/test-queries.yml
vendored
48
.github/workflows/test-queries.yml
vendored
|
|
@ -1,12 +1,12 @@
|
|||
name: Test queries
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "master"
|
||||
# push:
|
||||
# branches:
|
||||
# - "main"
|
||||
pull_request:
|
||||
branches:
|
||||
- "master"
|
||||
- "main"
|
||||
|
||||
# Cancel any in-progress CI runs for a PR if it is updated
|
||||
concurrency:
|
||||
|
|
@ -24,29 +24,33 @@ jobs:
|
|||
matrix:
|
||||
os: [ubuntu-latest, windows-2022, macos-latest]
|
||||
cc: [gcc, clang]
|
||||
nvim_tag: [stable]
|
||||
nvim_tag: [nightly]
|
||||
exclude:
|
||||
- os: ubuntu-latest
|
||||
cc: clang
|
||||
nvim_tag: stable
|
||||
nvim_tag: nightly
|
||||
|
||||
- os: macos-latest
|
||||
cc: gcc
|
||||
nvim_tag: stable
|
||||
nvim_tag: nightly
|
||||
|
||||
- os: windows-2022
|
||||
cc: gcc
|
||||
nvim_tag: nightly
|
||||
|
||||
- os: windows-2022
|
||||
cc: clang
|
||||
nvim_tag: stable
|
||||
|
||||
include:
|
||||
- os: windows-2022
|
||||
cc: cl
|
||||
nvim_tag: stable
|
||||
|
||||
- os: ubuntu-latest
|
||||
cc: gcc
|
||||
nvim_tag: nightly
|
||||
|
||||
# include:
|
||||
# - os: windows-2022
|
||||
# cc: cl
|
||||
# nvim_tag: nightly
|
||||
|
||||
# - os: ubuntu-latest
|
||||
# cc: gcc
|
||||
# nvim_tag: nightly
|
||||
|
||||
name: Parser compilation
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
|
|
@ -72,16 +76,12 @@ jobs:
|
|||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
./parser/
|
||||
~/AppData/Local/nvim/pack/nvim-treesitter/start/nvim-treesitter/parser/
|
||||
key: ${{ matrix.os }}-${{ matrix.cc }}-${{ matrix.nvim_tag }}-parsers-v1-${{ hashFiles('./lockfile.json', './lua/nvim-treesitter/parsers.lua', './lua/nvim-treesitter/install.lua', './lua/nvim-treesitter/shell_command_selectors.lua') }}
|
||||
~/.local/share/nvim/site/parser/
|
||||
~/AppData/Local/nvim-data/site/parser/
|
||||
key: ${{ matrix.os }}-${{ matrix.cc }}-${{ matrix.nvim_tag }}-parsers-v1-${{ hashFiles('./lockfile.json', './lua/nvim-treesitter/parsers.lua', './lua/nvim-treesitter/install.lua', './lua/nvim-treesitter/util.lua') }}
|
||||
|
||||
- name: Compile parsers
|
||||
run: $NVIM --headless -c "lua require'nvim-treesitter.install'.prefer_git=false" -c "TSInstallSync all" -c "q"
|
||||
|
||||
- name: Post compile Windows
|
||||
if: matrix.os == 'windows-2022'
|
||||
run: cp -r ~/AppData/Local/nvim/pack/nvim-treesitter/start/nvim-treesitter/parser/* parser
|
||||
run: $NVIM -l ./scripts/install-parsers.lua
|
||||
|
||||
- name: Check query files
|
||||
run: ./scripts/check-queries.lua
|
||||
|
|
|
|||
13
.github/workflows/tests.yml
vendored
13
.github/workflows/tests.yml
vendored
|
|
@ -1,12 +1,12 @@
|
|||
name: Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "master"
|
||||
# push:
|
||||
# branches:
|
||||
# - "main"
|
||||
pull_request:
|
||||
branches:
|
||||
- "master"
|
||||
- "main"
|
||||
|
||||
# Cancel any in-progress CI runs for a PR if it is updated
|
||||
concurrency:
|
||||
|
|
@ -42,7 +42,7 @@ jobs:
|
|||
|
||||
- name: Install and prepare Neovim
|
||||
env:
|
||||
NVIM_TAG: stable
|
||||
NVIM_TAG: nightly
|
||||
TREE_SITTER_CLI_TAG: v0.20.8
|
||||
run: |
|
||||
bash ./scripts/ci-install-${{ matrix.os }}.sh
|
||||
|
|
@ -58,8 +58,7 @@ jobs:
|
|||
|
||||
- name: Compile parsers Unix like
|
||||
if: ${{ matrix.os != 'windows-latest' && steps.parsers-cache.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
nvim --headless -c "TSInstallSync all" -c "q"
|
||||
run: nvim -l ./scripts/install-parsers.lua
|
||||
|
||||
- name: Tests
|
||||
run: PATH=/usr/local/bin:$PATH ./scripts/run_tests.sh
|
||||
|
|
|
|||
2
.github/workflows/update-lockfile.yml
vendored
2
.github/workflows/update-lockfile.yml
vendored
|
|
@ -12,7 +12,7 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: master
|
||||
ref: main
|
||||
|
||||
- name: Prepare
|
||||
env:
|
||||
|
|
|
|||
2
.github/workflows/update-readme.yml
vendored
2
.github/workflows/update-readme.yml
vendored
|
|
@ -3,7 +3,7 @@ name: Update README
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue