From 40367038f99e7056ca0294c236cfb158dd3b0384 Mon Sep 17 00:00:00 2001 From: brokenpip3 Date: Sat, 29 Jul 2023 14:20:52 +0200 Subject: [PATCH 1/3] update bats-assert and detik --- action.yaml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/action.yaml b/action.yaml index 167da74..5aa9311 100644 --- a/action.yaml +++ b/action.yaml @@ -30,7 +30,7 @@ inputs: assert-version: description: "Bats-assert version, default to latest" required: false - default: "0.2.0" + default: "2.1.0" assert-path: description: "Bats-assert path, default to /usr/lib/bats-assert" required: false @@ -47,7 +47,7 @@ inputs: detik-version: description: "Bats-detik version, default to latest" required: false - default: "1.1.0" + default: "1.2.0" detik-path: description: "Bats-detik path, default to /usr/lib/bats-detik" required: false @@ -87,13 +87,14 @@ runs: mkdir -p ${TEMPDIR} sudo mkdir -p ${DESTDIR}/src/ - curl -sL ${url} | tar xvz -C ${TEMPDIR} --strip-components 1 && cd ${TEMPDIR} + curl -sL ${url} | tar xz -C ${TEMPDIR} --strip-components 1 && cd ${TEMPDIR} # Archlinux style, except that we are not in a fakeroot env so we need to use sudo sudo install -Dm755 load.bash ${DESTDIR}/load.bash for fn in src/*.bash; do sudo install -Dm755 $fn \ ${DESTDIR}/src/$(basename $fn) done + echo "Bats Support v$VERSION installed in $DESTDIR" # Cleanup bats-support if required [[ "${{ inputs.support-clean }}" = "true" ]] && rm -rf ${TEMPDIR} || exit 0 - name: "Download and install Bats-assert" @@ -107,13 +108,14 @@ runs: mkdir -p ${TEMPDIR} sudo mkdir -p ${DESTDIR}/src/ - curl -sL ${url} | tar xvz -C ${TEMPDIR} --strip-components 1 && cd ${TEMPDIR} + curl -sL ${url} | tar xz -C ${TEMPDIR} --strip-components 1 && cd ${TEMPDIR} # Archlinux style, except that we are not in a fakeroot env so we need to use sudo sudo install -Dm755 load.bash ${DESTDIR}/load.bash for fn in src/*.bash; do sudo install -Dm755 $fn \ ${DESTDIR}/src/$(basename $fn) done + echo "Bats Assert v$VERSION installed in $DESTDIR" # Cleanup bats-support if required [[ "${{ inputs.assert-clean }}" = "true" ]] && rm -rf ${TEMPDIR} || exit 0 - name: "Download and install Bats-detik" @@ -127,12 +129,13 @@ runs: mkdir -p ${TEMPDIR} sudo mkdir -p ${DESTDIR}/src/ - curl -sL ${url} | tar xvz -C ${TEMPDIR} --strip-components 1 && cd ${TEMPDIR} + curl -sL ${url} | tar xz -C ${TEMPDIR} --strip-components 1 && cd ${TEMPDIR} # Archlinux style, except that we are not in a fakeroot env so we need to use sudo for fn in lib/*.bash; do sudo install -Dm755 $fn \ ${DESTDIR}/$(basename $fn) done + echo "Bats Detik v$VERSION installed in $DESTDIR" # Cleanup bats-support if required [[ "${{ inputs.detik-clean }}" = "true" ]] && rm -rf ${TEMPDIR} || exit 0 - name: "Download and install Bats-file" @@ -146,12 +149,13 @@ runs: mkdir -p ${TEMPDIR} sudo mkdir -p ${DESTDIR}/src/ - curl -sL ${url} | tar xvz -C ${TEMPDIR} --strip-components 1 && cd ${TEMPDIR} + curl -sL ${url} | tar xz -C ${TEMPDIR} --strip-components 1 && cd ${TEMPDIR} # Archlinux style, except that we are not in a fakeroot env so we need to use sudo sudo install -Dm755 load.bash ${DESTDIR}/load.bash for fn in src/*.bash; do sudo install -Dm755 $fn \ ${DESTDIR}/src/$(basename $fn) done + echo "Bats File v$VERSION installed in $DESTDIR" # Cleanup bats-support if required [[ "${{ inputs.file-clean }}" = "true" ]] && rm -rf ${TEMPDIR} || exit 0 From bd46c93a61594655859f2c28530117bf73d8bf79 Mon Sep 17 00:00:00 2001 From: brokenpip3 Date: Sat, 29 Jul 2023 14:32:42 +0200 Subject: [PATCH 2/3] fixup! --- .github/workflows/test-local-action.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-local-action.yaml b/.github/workflows/test-local-action.yaml index 1f8259e..d6910b8 100644 --- a/.github/workflows/test-local-action.yaml +++ b/.github/workflows/test-local-action.yaml @@ -48,14 +48,15 @@ jobs: runs-on: ubuntu-latest env: BATS_LIB_PATH: "/usr/lib/bats" - name: local default + TERM: xterm + name: local default cache steps: - name: Checkout uses: actions/checkout@v2 - name: Setup BATS uses: mig4/setup-bats@v1 with: - bats-version: 1.9.0 + bats-version: 1.10.0 - name: Setup Bats-libs uses: ./ with: From 26761eb18d31c8867272054eddbebaeefe6726f3 Mon Sep 17 00:00:00 2001 From: brokenpip3 Date: Sat, 29 Jul 2023 14:52:02 +0200 Subject: [PATCH 3/3] fix bats lib second run --- .github/workflows/test-local-action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-local-action.yaml b/.github/workflows/test-local-action.yaml index d6910b8..694d04b 100644 --- a/.github/workflows/test-local-action.yaml +++ b/.github/workflows/test-local-action.yaml @@ -47,7 +47,7 @@ jobs: needs: [local_test] runs-on: ubuntu-latest env: - BATS_LIB_PATH: "/usr/lib/bats" + BATS_LIB_PATH: "/usr/lib" TERM: xterm name: local default cache steps: