| 1 |
name: Tests |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: [master] |
| 6 |
pull_request: |
| 7 |
branches: [master] |
| 8 |
|
| 9 |
# Cancel any in-progress CI runs for a PR if it is updated |
| 10 |
concurrency: |
| 11 |
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} |
| 12 |
cancel-in-progress: true |
| 13 |
|
| 14 |
jobs: |
| 15 |
tests: |
| 16 |
name: ${{ matrix.os }} ${{ matrix.flavor }} |
| 17 |
strategy: |
| 18 |
fail-fast: false |
| 19 |
matrix: |
| 20 |
include: |
| 21 |
- flavor: nvim-0.7 |
| 22 |
runner: ubuntu-22.04 |
| 23 |
os: linux |
| 24 |
nvim_version: v0.7.0 |
| 25 |
- flavor: nvim-0.8 |
| 26 |
runner: ubuntu-22.04 |
| 27 |
os: linux |
| 28 |
nvim_version: v0.8.0 |
| 29 |
- flavor: nvim-0.9 |
| 30 |
runner: ubuntu-22.04 |
| 31 |
os: linux |
| 32 |
nvim_version: v0.9.0 |
| 33 |
- flavor: nvim-0.10 |
| 34 |
runner: ubuntu-22.04 |
| 35 |
os: linux |
| 36 |
nvim_version: v0.10.0 |
| 37 |
- flavor: nvim-0.11 |
| 38 |
runner: ubuntu-22.04 |
| 39 |
os: linux |
| 40 |
nvim_version: v0.11.0 |
| 41 |
- flavor: nvim-nightly |
| 42 |
runner: ubuntu-22.04 |
| 43 |
os: linux |
| 44 |
nvim_version: nightly |
| 45 |
runs-on: ${{ matrix.runner }} |
| 46 |
timeout-minutes: 10 |
| 47 |
steps: |
| 48 |
- uses: actions/checkout@v2 |
| 49 |
- name: Setup Test Environment |
| 50 |
run: | |
| 51 |
mkdir -p ./tmp_home/nvim/pack/vendor/start |
| 52 |
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ./tmp_home/nvim/pack/vendor/start/plenary.nvim |
| 53 |
git clone --depth 1 https://github.com/nvim-tree/nvim-web-devicons ./tmp_home/nvim/pack/vendor/start/nvim-web-devicons |
| 54 |
ln -s $(pwd) ./tmp_home/nvim/pack/vendor/start |
| 55 |
- name: Setup neovim ${{matrix.nvim_version}} |
| 56 |
uses: rhysd/action-setup-vim@v1 |
| 57 |
with: |
| 58 |
neovim: true |
| 59 |
version: ${{matrix.nvim_version}} |
| 60 |
- name: Run tests |
| 61 |
run: | |
| 62 |
make test |
| 63 |
lint: |
| 64 |
runs-on: ubuntu-22.04 |
| 65 |
timeout-minutes: 10 |
| 66 |
steps: |
| 67 |
- uses: actions/checkout@v2 |
| 68 |
- name: Setup linters |
| 69 |
run: | |
| 70 |
sudo apt-get update |
| 71 |
sudo apt-get install luarocks |
| 72 |
sudo luarocks install luacheck |
| 73 |
- name: Run luacheck |
| 74 |
run: | |
| 75 |
make lint |