File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 branches : ['master']
55 pull_request :
66 branches : ['master']
7+
78permissions :
89 contents : read
910
4243 id : toolchain
4344 - run : cargo test
4445
46+ corpus :
47+ name : Corpus test
48+ runs-on : ubuntu-latest
49+ timeout-minutes : 10
50+ env :
51+ NVIM_TS_DIR : .test/nvim-treesitter
52+ steps :
53+ - uses : actions/checkout@v4
54+ - uses : tree-sitter/setup-action/cli@v1
55+ - uses : dtolnay/rust-toolchain@1.86.0
56+ id : toolchain
57+
58+ - name : Compile
59+ run : |
60+ cargo build --release
61+ echo ${{ github.workspace }}/target/release >> $GITHUB_PATH
62+
63+ - name : Clone nvim-treesitter corpus
64+ uses : actions/checkout@v4
65+ with :
66+ repository : nvim-treesitter/nvim-treesitter
67+ ref : main
68+ path : ${{ env.NVIM_TS_DIR }}
69+
70+ - name : Setup parsers cache
71+ id : parsers-cache
72+ uses : actions/cache@v4
73+ with :
74+ path : ~/.local/share/nvim/site/parser/
75+ key : parsers-${{ hashFiles('**/lua/nvim-treesitter/parsers.lua') }}
76+
77+ - name : Compile parsers
78+ if : steps.parsers-cache.outputs.cache-hit != 'true'
79+ working-directory : ${{ env.NVIM_TS_DIR }}
80+ run : |
81+ bash ./scripts/ci-install.sh
82+ nvim -l ./scripts/install-parsers.lua
83+
84+ - name : Check corpus
85+ working-directory : ${{ env.NVIM_TS_DIR }}
86+ run : ts_query_ls check runtime/queries
87+
88+ - name : Format corpus
89+ working-directory : ${{ env.NVIM_TS_DIR }}
90+ run : |
91+ ts_query_ls format runtime/queries
92+ git diff --exit-code
93+
4594 generate-schema :
4695 name : Generate schema
4796 runs-on : ubuntu-latest
You can’t perform that action at this time.
0 commit comments