tests: improve testing (#80)

* chore: setup mini.test

* chore(ci): setup new test runner, install plugin deps

* chore(ci): test only on stable and nightly releases

* test: iferr

* test: struct_tags

* test: impl

* test: gotests
This commit is contained in:
Smirnov Oleksandr 2025-02-24 14:21:01 +02:00 committed by GitHub
parent 0ed14a40d9
commit da960189c1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 435 additions and 101 deletions

View file

@ -1,5 +1,11 @@
name: linters
on: [push, pull_request]
on:
push:
branches:
- main
- develop
pull_request:
jobs:
linters:

View file

@ -1,25 +1,20 @@
name: tests
on: [push, pull_request]
on:
push:
branches:
- main
- develop
pull_request:
jobs:
tests:
strategy:
matrix:
os: [ubuntu-latest]
nvim_version:
version:
- v0.10.4
- nightly
- v0.7.0
- v0.7.2
- v0.8.0
- v0.8.1
- v0.8.2
- v0.8.3
- v0.9.0
- v0.9.1
- v0.9.2
- v0.9.4
- v0.9.5
- v0.10.0
runs-on: ${{ matrix.os }}
steps:
- name: Install Task
@ -28,18 +23,33 @@ jobs:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: "1.24.0"
check-latest: false
- name: Install NeoVim
uses: rhysd/action-setup-vim@v1
with:
neovim: true
version: ${{ matrix.version }}
- uses: actions/checkout@v3
- name: Install Neovim
run: |
mkdir -p /tmp/nvim
wget -q https://github.com/neovim/neovim/releases/download/${{ matrix.nvim_version }}/nvim.appimage -O /tmp/nvim/nvim.appimage
cd /tmp/nvim
chmod a+x ./nvim.appimage
./nvim.appimage --appimage-extract
echo "/tmp/nvim/squashfs-root/usr/bin/" >> $GITHUB_PATH
- name: Cache .tests
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/.tests
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-tests-${{ hashFiles('${{ github.workspace }}/.tests') }}
- name: Install Go bins
run: nvim --headless -u "./scripts/minimal_init.lua" -c "GoInstallDeps" -c "qa!"
- name: Run Tests
run: |
nvim --version
task test
task tests