gopher.nvim/.github/workflows/tests.yml
Smirnov Oleksandr e9f2eef5e7
refactor: treesitter utils (#91)
* refactor(ts_utils): i dont know why event it was here

* fix: typos

* fix(struct_tags)!: remove statement that i used for debug

* refactor(ts_util): start from scratch

* refactor(struct_tags): use new ts_util

* fixup! refactor(struct_tags): use new ts_util

* test(struct_tags): add support for multiple structs

* fix(gotests): use new api

* fix(impl): refactor some logic, use new api

* docs(ts): add an explanation

* refactor(_utils.ts): all public methods are just adapters

* fix(comment): now it works

* fixup! refactor(_utils.ts): all public methods are just adapters

* fixup! fixup! refactor(_utils.ts): all public methods are just adapters

* test(comment): e2e

* tests(comment): fix

* refactor(utils.ts): fix, docs

* test(comment): fix tests again

* fix(tests/comments): well, now i fell stupid

* refactor(ts): add assert just to be sure that all elements are in the result

* fix(ts): type annotations

* fix(ts): pass bufnr to vim.treesitter.get_node

* chore(ci): disable nightly

* chore(ci): reorganize
2025-03-19 15:09:57 +02:00

60 lines
1.4 KiB
YAML

name: tests
on:
push:
branches:
- main
- develop
pull_request:
jobs:
tests:
strategy:
matrix:
os: [ubuntu-latest]
version:
- stable
# - nightly # TODO: enable when stable
runs-on: ${{ matrix.os }}
steps:
- name: Install Task
uses: arduino/setup-task@v1
with:
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: 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: |
# TODO: install with :GoInstallDeps
go install github.com/fatih/gomodifytags@latest
go install github.com/josharian/impl@latest
go install github.com/cweill/gotests/...@latest
go install github.com/koron/iferr@latest
- name: Run Tests
run: |
nvim --version
task tests