|
1 | 1 | name: Tests |
2 | 2 |
|
3 | | -on: [push, pull_request] |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + types: |
| 6 | + - opened |
| 7 | + - synchronize |
| 8 | + - reopened |
4 | 9 |
|
| 10 | + workflow_dispatch: |
5 | 11 | jobs: |
6 | | - x64-ubuntu: |
7 | | - name: X64-ubuntu |
8 | | - runs-on: ${{ matrix.os }} |
| 12 | + tests: |
| 13 | + runs-on: ubuntu-latest |
| 14 | + |
9 | 15 | strategy: |
10 | | - fail-fast: false |
11 | 16 | matrix: |
12 | | - include: |
13 | | - - os: ubuntu-20.04 |
14 | | - url: https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz |
15 | | - manager: sudo apt-get |
16 | | - packages: -y fd-find |
| 17 | + neovim_version: ["stable", "v0.7.0"] |
| 18 | + |
17 | 19 | steps: |
18 | | - - uses: actions/checkout@v2 |
19 | | - - run: date +%F > todays-date |
20 | | - - name: Restore from todays cache |
21 | | - uses: actions/cache@v2 |
| 20 | + - name: Checkout |
| 21 | + uses: actions/checkout@v6 |
| 22 | + |
| 23 | + - name: Setup neovim |
| 24 | + uses: rhysd/action-setup-vim@v1 |
22 | 25 | with: |
23 | | - path: _neovim |
24 | | - key: ${{ runner.os }}-${{ matrix.url }}-${{ hashFiles('todays-date') }} |
25 | | - - name: Prepare |
| 26 | + neovim: true |
| 27 | + version: ${{ matrix.neovim_version }} |
| 28 | + |
| 29 | + - name: Install Dependence |
26 | 30 | run: | |
27 | | - ${{ matrix.manager }} update |
28 | | - ${{ matrix.manager }} install ${{ matrix.packages }} |
29 | | - test -d _neovim || { |
30 | | - mkdir -p _neovim |
31 | | - curl -sL ${{ matrix.url }} | tar xzf - --strip-components=1 -C "${PWD}/_neovim" |
32 | | - } |
33 | 31 | mkdir -p ~/.local/share/nvim/site/pack/vendor/start |
34 | | - git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim |
35 | | - git clone --depth 1 https://github.com/nvim-treesitter/nvim-treesitter ~/.local/share/nvim/site/pack/vendor/start/nvim-treesitter |
36 | | - git clone --depth 1 https://github.com/nvim-treesitter/playground ~/.local/share/nvim/site/pack/vendor/start/playground |
37 | | - ln -s $(pwd) ~/.local/share/nvim/site/pack/vendor/start |
| 32 | + git clone --depth 1 --branch master https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim |
| 33 | + git clone --depth 1 --branch main https://github.com/nvim-treesitter/nvim-treesitter ~/.local/share/nvim/site/pack/vendor/start/nvim-treesitter |
38 | 34 | - name: Run tests |
39 | 35 | run: | |
40 | | - export PATH="${PWD}/_neovim/bin:${PATH}" |
41 | | - export VIM="${PWD}/_neovim/share/nvim/runtime" |
42 | | - nvim --headless -u tests/minimal.vim -c "TSInstallSync all" -c "q" |
| 36 | + nvim --headless -u tests/minimal.vim -c "TSInstall lua javascript rust markdown markdown_inline" -c "q" |
43 | 37 | make test |
44 | | -
|
0 commit comments