ci(test): added golang
setup to test go install
command
#12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
run_tests: | |
name: unit tests | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
rev: [nightly, v0.9.0, stable] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v4 | |
name: Set up Go | |
with: | |
go-version: ~1.21 | |
- uses: rhysd/action-setup-vim@v1 | |
name: Set up Neovim | |
with: | |
neovim: true | |
version: ${{ matrix.rev }} | |
- name: Run tests with Neovim on Ubuntu and MacOS | |
shell: bash | |
run: | | |
export PATH="${PWD}/_neovim/bin:${PATH}" | |
export VIM="${PWD}/_neovim/share/nvim/runtime" | |
nvim --version | |
make test-nvim | |
if: ${{ runner.os }} != "Windows" | |
- name: Run tests with Neovim on Windows | |
shell: pwsh | |
run: | | |
$env:PATH += ";$env:PWD\_neovim\bin;$env:PATH" | |
$env:VIM = "$env:PWD\_neovim\share\nvim\runtime" | |
nvim --version | |
make test-nvim | |
if: ${{ runner.os }} == "Windows" | |
- uses: actions/checkout@v4 | |
- name: Install LuaJIT | |
uses: leafo/gh-actions-lua@v10 | |
with: | |
luaVersion: "luajit-2.1.0-beta3" | |
- name: Install Luarocks on Ubuntu and MacOS | |
uses: leafo/gh-actions-luarocks@v4 | |
if: ${{ runner.os }} != "Windows" | |
- name: Install Luarocks on Ubuntu and MacOS | |
uses: hishamhm/gh-actions-luarocks@d7d707a17da0e25dd2c9f79b979116b228d627ce # Until windows support is available | |
if: ${{ runner.os }} == "Windows" | |
- name: Run test with vusted | |
shell: bash | |
run: | | |
luarocks install vusted | |
nvim --version | |
make test | |
- name: Run test with vusted | |
shell: pwsh | |
run: | | |
luarocks install vusted | |
nvim --version | |
make test |