Skip to content

Commit

Permalink
Refactor test scripts and add to test matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
julienvincent committed Oct 10, 2024
1 parent dd851b3 commit f3684d1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
channel: [stable, nightly]
channel: [v0.9.5, v0.10.0, stable, nightly]
steps:
- uses: actions/checkout@v2

Expand Down
15 changes: 12 additions & 3 deletions Justfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
[macos]
prepare-nvim channel:
#!/usr/bin/env bash
set -eo pipefail
NVIM_DIR=".build/nvim/{{ channel }}"

test -d $NVIM_DIR || {
mkdir -p $NVIM_DIR

curl -L https://github.com/neovim/neovim/releases/download/{{ channel }}/nvim-macos.tar.gz > ./.build/nvim-macos.tar.gz
# Older versions of nvim don't have arch specific releases - so we do a simple retry without the arch component.
curl -L https://github.com/neovim/neovim/releases/download/{{ channel }}/nvim-macos-$(arch).tar.gz --fail > ./.build/nvim-macos.tar.gz || \
curl -L https://github.com/neovim/neovim/releases/download/{{ channel }}/nvim-macos.tar.gz --fail > ./.build/nvim-macos.tar.gz

xattr -c ./.build/nvim-macos.tar.gz
tar xzf ./.build/nvim-macos.tar.gz -C $NVIM_DIR --strip-components=1
rm ./.build/nvim-macos.tar.gz
Expand All @@ -15,6 +20,8 @@ prepare-nvim channel:
[linux]
prepare-nvim channel:
#!/usr/bin/env bash
set -eo pipefail
NVIM_DIR=".build/nvim/{{ channel }}"

test -d $NVIM_DIR || {
Expand All @@ -37,11 +44,13 @@ prepare channel: (prepare-nvim channel) prepare-dependencies

test channel="stable" file="": (prepare channel)
#!/usr/bin/env bash
set -eo pipefail
NVIM_DIR=".build/nvim/{{ channel }}"

./$NVIM_DIR/bin/nvim --version
./$NVIM_DIR/bin/nvim \
--headless \
--noplugin \
-u tests/init.lua \
-c "PlenaryBustedDirectory tests/nvim-paredit/{{ file }} { minimal_init='tests/init.lua', sequential=true }"
-u tests/config.lua \
-c "PlenaryBustedDirectory tests/nvim-paredit/{{ file }} { minimal_init='tests/config.lua', sequential=true }"
File renamed without changes.

0 comments on commit f3684d1

Please sign in to comment.