Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor test scripts and add to test matrix #64

Merged
merged 2 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ 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.
Loading