File tree 2 files changed +19
-4
lines changed
2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change 10
10
11
11
jobs :
12
12
local_test_home :
13
+ strategy :
14
+ fail-fast : false
15
+ matrix :
16
+ version : ["1.9.0", "1.10.0", "1.11.0"]
13
17
runs-on : ubuntu-latest
14
18
env :
15
19
BATS_LIB_PATH : " ${{ github.workspace }}/tests"
22
26
id : bats-action
23
27
uses : ./
24
28
with :
29
+ bats-version : ${{ matrix.version }}
25
30
support-clean : " false"
26
31
support-path : " ${{ github.workspace }}/tests/bats-support"
27
32
assert-clean : " false"
Original file line number Diff line number Diff line change @@ -145,10 +145,20 @@ runs:
145
145
146
146
# Archlinux style, except that we are not in a fakeroot env
147
147
# https://gitlab.archlinux.org/archlinux/packaging/packages/bash-bats/-/blob/main/PKGBUILD
148
- sed -i 's|BATS_ROOT/libexec/bats-core/bats|BATS_ROOT/share/bats/bats|g' bin/bats lib/bats-core/*
149
- sed -i 's|BATS_BASE_LIBDIR=lib|BATS_BASE_LIBDIR=share|g' bin/bats
150
- sed -i 's|BATS_LIBDIR/bats-core/|BATS_LIBDIR/bats/|g' libexec/bats-core/*
151
- sed -i 's|BATS_LIBDIR/bats-core/|BATS_LIBDIR/bats/|g' lib/bats-core/*
148
+
149
+ # TODO: find a better way to understand if the version of bats is =< 1.10
150
+ # without installing semver binaries.
151
+ # TODO: we may consider to use the upstream install.sh script now
152
+ if [ -f libexec/bats-core/bats-gather-tests ]; then
153
+ set -i 's|BATS_BASE_LIBDIR=lib|BATS_BASE_LIBDIR=share|g' bin/bats
154
+ sed -i 's|BATS_ROOT/libexec/bats-core/bats|BATS_ROOT/share/bats/bats|g' bin/bats
155
+ sed -i 's|BATS_ROOT/$BATS_LIBDIR/bats-core/|BATS_ROOT/$BATS_LIBDIR/bats/|g' libexec/bats-core/*
156
+ sed -i 's|BATS_ROOT/$BATS_LIBDIR/bats-core/|BATS_ROOT/$BATS_LIBDIR/bats/|g' lib/bats-core/*
157
+ else
158
+ sed -i 's|BATS_ROOT/libexec/bats-core/bats|BATS_ROOT/share/bats/bats|g' bin/bats
159
+ sed -i 's|BATS_ROOT/lib/bats-core/|BATS_ROOT/share/bats/|g' libexec/bats-core/*
160
+ sed -i 's|BATS_ROOT/lib/bats-core/|BATS_ROOT/share/bats/|g' lib/bats-core/*
161
+ fi
152
162
153
163
for fn in libexec/bats-core/*; do
154
164
install -Dm755 ${fn} \
You can’t perform that action at this time.
0 commit comments