|
1 |
| -# This is a basic workflow to help you get started with Actions |
| 1 | +name: CI |
2 | 2 |
|
3 |
| -name: Main workflow |
4 |
| - |
5 |
| -# Controls when the workflow will run |
6 | 3 | on:
|
7 |
| - # Triggers the workflow on push or pull request events but only for the master branch |
8 | 4 | push:
|
9 |
| - branches: [ master ] |
| 5 | + branches: [master] |
| 6 | + paths: |
| 7 | + - grammar.js |
| 8 | + - src/** |
| 9 | + - test/** |
| 10 | + - bindings/** |
| 11 | + - binding.gyp |
10 | 12 | pull_request:
|
11 |
| - branches: [ master ] |
| 13 | + paths: |
| 14 | + - grammar.js |
| 15 | + - src/** |
| 16 | + - test/** |
| 17 | + - bindings/** |
| 18 | + - binding.gyp |
| 19 | + |
| 20 | +concurrency: |
| 21 | + group: ${{github.workflow}}-${{github.ref}} |
| 22 | + cancel-in-progress: true |
12 | 23 |
|
13 |
| -# A workflow run is made up of one or more jobs that can run sequentially or in parallel |
14 | 24 | jobs:
|
15 |
| - # This workflow contains a single job called "build" |
16 |
| - lint: |
17 |
| - name: Lint grammar |
18 |
| - runs-on: ubuntu-latest |
19 |
| - steps: |
20 |
| - - uses: actions/checkout@v3 |
21 |
| - - uses: actions/setup-node@v3 |
22 |
| - - name: Install Dependencies |
23 |
| - run: npm install |
24 |
| - - name: Run lint |
25 |
| - run: | |
26 |
| - npm run lint |
27 | 25 | test:
|
28 |
| - name: Tree-sitter tests |
29 |
| - runs-on: ubuntu-latest |
30 |
| - needs: lint |
31 |
| - # Steps represent a sequence of tasks that will be executed as part of the job |
| 26 | + name: Test parser |
| 27 | + runs-on: ${{matrix.os}} |
| 28 | + strategy: |
| 29 | + fail-fast: false |
| 30 | + matrix: |
| 31 | + os: |
| 32 | + - ubuntu-latest |
| 33 | + # windows-latest |
| 34 | + - macos-14 |
32 | 35 | steps:
|
33 |
| - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it |
34 |
| - - uses: actions/checkout@v3 |
35 |
| - - uses: actions/setup-node@v3 |
36 |
| - - name: Install Dependencies |
37 |
| - run: npm install |
38 |
| - |
| 36 | + - name: Set up repository |
| 37 | + uses: tree-sitter/[email protected] |
| 38 | + with: |
| 39 | + node-version: ${{vars.NODE_VERSION}} |
| 40 | + - name: Clone neovim runtime |
| 41 | + uses: actions/checkout@v4 |
| 42 | + with: |
| 43 | + repository: neovim/neovim |
| 44 | + path: .tests/neovim |
| 45 | + sparse-checkout: runtime/ |
39 | 46 | - name: Run tests
|
40 |
| - run: | |
41 |
| - npm run build |
42 |
| - npm run test |
43 |
| - parse-runtime: |
44 |
| - name: Parse runtime files |
45 |
| - runs-on: ubuntu-latest |
46 |
| - needs: lint |
47 |
| - steps: |
48 |
| - - uses: actions/checkout@v3 |
49 |
| - - uses: actions/setup-node@v3 |
50 |
| - - name: Install Dependencies |
51 |
| - run: | |
52 |
| - npm install |
53 |
| - - name: Download and parse runtime files |
54 |
| - env: |
55 |
| - NVIM_VERSION: "master" |
56 |
| - run: | |
57 |
| - ./scripts/parse_runtime_files.sh |
| 47 | + uses: tree-sitter/[email protected] |
| 48 | + with: |
| 49 | + lint: true |
| 50 | + corpus-files: |- |
| 51 | + .tests/neovim/runtime/**/*.vim |
| 52 | + !.tests/neovim/runtime/autoload/ada.vim |
| 53 | + !.tests/neovim/runtime/autoload/adacomplete.vim |
| 54 | + !.tests/neovim/runtime/autoload/context.vim |
| 55 | + !.tests/neovim/runtime/autoload/decada.vim |
| 56 | + !.tests/neovim/runtime/autoload/gnat.vim |
| 57 | + !.tests/neovim/runtime/autoload/gzip.vim |
| 58 | + !.tests/neovim/runtime/autoload/javascriptcomplete.vim |
| 59 | + !.tests/neovim/runtime/autoload/msgpack.vim |
| 60 | + !.tests/neovim/runtime/autoload/netrw.vim |
| 61 | + !.tests/neovim/runtime/autoload/netrwSettings.vim |
| 62 | + !.tests/neovim/runtime/autoload/phpcomplete.vim |
| 63 | + !.tests/neovim/runtime/autoload/provider/clipboard.vim |
| 64 | + !.tests/neovim/runtime/autoload/provider/perl.vim |
| 65 | + !.tests/neovim/runtime/autoload/provider/python3.vim |
| 66 | + !.tests/neovim/runtime/autoload/provider/ruby.vim |
| 67 | + !.tests/neovim/runtime/autoload/python3complete.vim |
| 68 | + !.tests/neovim/runtime/autoload/shada.vim |
| 69 | + !.tests/neovim/runtime/autoload/spellfile.vim |
| 70 | + !.tests/neovim/runtime/autoload/tar.vim |
| 71 | + !.tests/neovim/runtime/autoload/tutor.vim |
| 72 | + !.tests/neovim/runtime/autoload/zip.vim |
| 73 | + !.tests/neovim/runtime/compiler/bdf.vim |
| 74 | + !.tests/neovim/runtime/compiler/mcs.vim |
| 75 | + !.tests/neovim/runtime/ftoff.vim |
| 76 | + !.tests/neovim/runtime/ftplugin/abaqus.vim |
| 77 | + !.tests/neovim/runtime/ftplugin/changelog.vim |
| 78 | + !.tests/neovim/runtime/ftplugin/debchangelog.vim |
| 79 | + !.tests/neovim/runtime/ftplugin/forth.vim |
| 80 | + !.tests/neovim/runtime/ftplugin/gdscript.vim |
| 81 | + !.tests/neovim/runtime/ftplugin/gpg.vim |
| 82 | + !.tests/neovim/runtime/ftplugin/markdown.vim |
| 83 | + !.tests/neovim/runtime/ftplugin/mermaid.vim |
| 84 | + !.tests/neovim/runtime/ftplugin/modconf.vim |
| 85 | + !.tests/neovim/runtime/ftplugin/muttrc.vim |
| 86 | + !.tests/neovim/runtime/ftplugin/python.vim |
| 87 | + !.tests/neovim/runtime/ftplugin/readline.vim |
| 88 | + !.tests/neovim/runtime/ftplugin/ruby.vim |
| 89 | + !.tests/neovim/runtime/ftplugin/rust.vim |
| 90 | + !.tests/neovim/runtime/ftplugin/sshconfig.vim |
| 91 | + !.tests/neovim/runtime/ftplugin/sudoers.vim |
| 92 | + !.tests/neovim/runtime/ftplugin/udevrules.vim |
| 93 | + !.tests/neovim/runtime/ftplugin/vhdl.vim |
| 94 | + !.tests/neovim/runtime/ftplugin/vim.vim |
| 95 | + !.tests/neovim/runtime/ftplugin/zig.vim |
| 96 | + !.tests/neovim/runtime/ftplugin.vim |
| 97 | + !.tests/neovim/runtime/ftplugof.vim |
| 98 | + !.tests/neovim/runtime/indent/ada.vim |
| 99 | + !.tests/neovim/runtime/indent/dylan.vim |
| 100 | + !.tests/neovim/runtime/indent/javascript.vim |
| 101 | + !.tests/neovim/runtime/indent/krl.vim |
| 102 | + !.tests/neovim/runtime/indent/php.vim |
| 103 | + !.tests/neovim/runtime/indent/rapid.vim |
| 104 | + !.tests/neovim/runtime/indent.vim |
| 105 | + !.tests/neovim/runtime/indoff.vim |
| 106 | + !.tests/neovim/runtime/keymap/*.vim |
| 107 | + !.tests/neovim/runtime/makemenu.vim |
| 108 | + !.tests/neovim/runtime/menu.vim |
| 109 | + !.tests/neovim/runtime/pack/dist/opt/swapmouse/plugin/swapmouse.vim |
| 110 | + !.tests/neovim/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim |
| 111 | + !.tests/neovim/runtime/plugin/shada.vim |
| 112 | + !.tests/neovim/runtime/syntax/**/*.vim |
0 commit comments