Skip to content

Commit

Permalink
ci: add windows-latest test
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Ryall committed Jan 5, 2024
1 parent 6494af8 commit 742330e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
26 changes: 18 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: rhysd/action-setup-vim@v1
Expand All @@ -23,24 +23,34 @@ jobs:
with:
luaVersion: "luajit-2.1.0-beta3"

- name: luarocks
uses: leafo/gh-actions-luarocks@v4
- uses: notomo/action-setup-nvim-lua@v1
- run: luarocks install vusted
- run: luarocks install luacheck

- name: install plenary.nvim
if: matrix.os != 'windows-latest'
run: |
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary
# git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim
- name: setup tools
shell: bash
- name: install plenary.nvim on windows
if: matrix.os == 'windows-latest'
run: |
luarocks install luacheck
luarocks install vusted
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ./plenary
- name: Run tests
if: matrix.os != 'windows-latest'
shell: bash
env:
VUSTED_NVIM: ${{ steps.vim.outputs.executable }}
VUSTED_ARGS: "--headless"
run: |
make test
- name: Run tests
if: matrix.os == 'windows-latest'
shell: bash
env:
VUSTED_NVIM: ${{ steps.vim.outputs.executable }}
VUSTED_ARGS: "--headless"
run: |
make wintest
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ lint:
.PHONY: test
test:
vusted --output=gtest ./lua

.PHONY: windtest
windtest:
vusted --output=gtest -m './plenary' ./lua

0 comments on commit 742330e

Please sign in to comment.