From 742330e2c005c37a10dcb5e5eeede49de81592d3 Mon Sep 17 00:00:00 2001 From: Brian Ryall Date: Thu, 4 Jan 2024 15:16:31 -0500 Subject: [PATCH] ci: add windows-latest test --- .github/workflows/ci.yml | 26 ++++++++++++++++++-------- Makefile | 4 ++++ 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4c2d1f5..b40b638 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 diff --git a/Makefile b/Makefile index f85615b..73112ee 100644 --- a/Makefile +++ b/Makefile @@ -6,3 +6,7 @@ lint: .PHONY: test test: vusted --output=gtest ./lua + +.PHONY: windtest +windtest: + vusted --output=gtest -m './plenary' ./lua