Repository navigation
100 lines (85 loc) · 2.7 KB
/
Copy pathtests.yaml
File metadata and controls
100 lines (85 loc) · 2.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
---
name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
actionlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Download actionlint
id: get_actionlint
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
shell: bash
- name: Check workflow files
run: ${{ steps.get_actionlint.outputs.executable }} -color
shell: bash
stylua:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: JohnnyMorganz/stylua-action@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: --color always --check lua/ tests/
luacheck:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v7
- name: Prepare
run: |
sudo apt-get update
sudo apt-get install -y luarocks
sudo luarocks install luacheck
- name: Lint
run: luacheck lua/
selene:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install selene
run: cargo install selene
- name: Run selene
run: selene lua/ tests/
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: stevearc/nvim-typecheck-action@v2
with:
path: lua/
unit_test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
neovim_branch: ["v0.11.7", "stable", "nightly"]
steps:
- uses: actions/checkout@v7
- name: Install Neovim
uses: rhysd/action-setup-vim@v1
with:
neovim: true
version: ${{ matrix.neovim_branch }}
- name: Install treesitter CLI
uses: tree-sitter/setup-action@v2
- name: Install dependent repos
run: |
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim
git clone --depth 1 https://github.com/nvim-mini/mini.nvim ~/.local/share/nvim/site/pack/vendor/start/mini.nvim
- name: Install treesitter (master)
if: matrix.neovim_branch == 'v0.11.7'
run: |
git clone --depth 1 --branch master https://github.com/nvim-treesitter/nvim-treesitter ~/.local/share/nvim/site/pack/vendor/start/nvim-treesitter
- name: Install treesitter (main)
if: matrix.neovim_branch != 'v0.11.7'
run: |
git clone --depth 1 --branch main https://github.com/nvim-treesitter/nvim-treesitter ~/.local/share/nvim/site/pack/vendor/start/nvim-treesitter
- name: Run tests
run: |
make test