diff --git a/.github/workflows/test-local-action.yaml b/.github/workflows/test-local-action.yaml index 1f8259e..694d04b 100644 --- a/.github/workflows/test-local-action.yaml +++ b/.github/workflows/test-local-action.yaml @@ -47,15 +47,16 @@ jobs: needs: [local_test] runs-on: ubuntu-latest env: - BATS_LIB_PATH: "/usr/lib/bats" - name: local default + BATS_LIB_PATH: "/usr/lib" + 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: 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