darhaethr
ci-bats Bats tests FAILED
ci-cucumber Cucumber tests FAILED
CI / feature (push) Failing after 50s
CI / main (push) Has been skipped

This commit is contained in:
moilanik
2026-06-13 06:26:57 +03:00
parent 76c836f0e1
commit bed016bbd8
+28 -10
View File
@@ -31,14 +31,21 @@ jobs:
id: prepare-bats
shell: bash
run: |
docker run --rm ${{ inputs.bats-image }} --help
echo "TOOL_OK=true" >> "${GITHUB_ENV}"
if docker run --rm ${{ inputs.bats-image }} --help > /dev/null 2>&1; then
echo "TOOL_OK=true" >> "${GITHUB_ENV}"
else
echo "TOOL_OK=false" >> "${GITHUB_ENV}"
fi
- name: Run bats tests
if: steps.prepare-bats.outcome == 'success'
if: always()
id: bats-tests
shell: bash
run: |
if [ "${TOOL_OK}" != "true" ]; then
echo "BATS_EXIT=1" >> "${GITHUB_ENV}"
exit 0
fi
mkdir -p "reports/${GITHUB_SHA:0:8}/bats"
set +e
docker run --rm -v "$PWD:/code" ${{ inputs.bats-image }} /code/tests/*.bats \
@@ -57,10 +64,12 @@ jobs:
exit ${BATS_EXIT}
- name: Publish bats reports
if: steps.prepare-bats.outcome == 'success'
if: always()
shell: bash
run: |
bash .ci/scripts/publish-git-pages.sh "reports/${GITHUB_SHA:0:8}/bats"
if [ "${TOOL_OK}" = "true" ]; then
bash .ci/scripts/publish-git-pages.sh "reports/${GITHUB_SHA:0:8}/bats"
fi
- name: Set bats commit status
if: always()
@@ -102,14 +111,21 @@ jobs:
id: prepare-cucumber
shell: bash
run: |
npx --package @cucumber/cucumber cucumber-js --help
echo "TOOL_OK=true" >> "${GITHUB_ENV}"
if npx --package @cucumber/cucumber cucumber-js --help > /dev/null 2>&1; then
echo "TOOL_OK=true" >> "${GITHUB_ENV}"
else
echo "TOOL_OK=false" >> "${GITHUB_ENV}"
fi
- name: Run cucumber tests
if: steps.prepare-cucumber.outcome == 'success'
if: always()
id: cucumber-tests
shell: bash
run: |
if [ "${TOOL_OK}" != "true" ]; then
echo "CUCUMBER_EXIT=1" >> "${GITHUB_ENV}"
exit 0
fi
mkdir -p "reports/${GITHUB_SHA:0:8}/cucumber"
set +e
npx --package @cucumber/cucumber cucumber-js \
@@ -120,10 +136,12 @@ jobs:
exit ${CUCUMBER_EXIT}
- name: Publish cucumber reports
if: steps.prepare-cucumber.outcome == 'success'
if: always()
shell: bash
run: |
bash .ci/scripts/publish-git-pages.sh "reports/${GITHUB_SHA:0:8}/cucumber"
if [ "${TOOL_OK}" = "true" ]; then
bash .ci/scripts/publish-git-pages.sh "reports/${GITHUB_SHA:0:8}/cucumber"
fi
- name: Set cucumber commit status
if: always()