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

This commit is contained in:
moilanik
2026-06-13 06:16:51 +03:00
parent b38103dbf4
commit 9ba26dfdef
+37 -13
View File
@@ -27,7 +27,15 @@ jobs:
repository: niko/gitea-ci-library
path: .ci
- name: Prepare bats
id: prepare-bats
shell: bash
run: |
docker run --rm ${{ inputs.bats-image }} --help
echo "TOOL_OK=true" >> "${GITHUB_ENV}"
- name: Run bats tests
if: env.TOOL_OK == 'true'
id: bats-tests
shell: bash
run: |
@@ -39,7 +47,9 @@ jobs:
{
echo "<html><body><h1>Bats tests</h1><ul>"
for f in reports/${GITHUB_SHA:0:8}/bats/*; do
echo "<li><a href=\"$(basename $f)\">$(basename $f)</a></li>"
b="$(basename $f)"
[ "$b" = "index.html" ] && continue
echo "<li><a href=\"$b\">$b</a></li>"
done
echo "</ul></body></html>"
} > "reports/${GITHUB_SHA:0:8}/bats/index.html"
@@ -47,7 +57,7 @@ jobs:
exit ${BATS_EXIT}
- name: Publish bats reports
if: always()
if: env.TOOL_OK == 'true'
shell: bash
run: |
bash .ci/scripts/publish-git-pages.sh "reports/${GITHUB_SHA:0:8}/bats"
@@ -56,17 +66,20 @@ jobs:
if: always()
shell: bash
run: |
if [ "${BATS_EXIT}" = "0" ]; then
if [ "${TOOL_OK}" != "true" ]; then
STATUS="failure"
DESC="Bats tool unavailable"
URL="https://gitea.app.keskikuja.site/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
elif [ "${BATS_EXIT}" = "0" ]; then
STATUS="success"
DESC="Bats tests"
URL="https://${PAGES_HOST}/${GITHUB_REPOSITORY}/reports/${GITHUB_SHA:0:8}/bats/"
else
STATUS="failure"
DESC="Bats tests FAILED"
URL="https://${PAGES_HOST}/${GITHUB_REPOSITORY}/reports/${GITHUB_SHA:0:8}/bats/"
fi
bash .ci/scripts/report-status.sh "$STATUS" \
"$DESC" \
"https://${PAGES_HOST}/${GITHUB_REPOSITORY}/reports/${GITHUB_SHA:0:8}/bats/" \
ci-bats
bash .ci/scripts/report-status.sh "$STATUS" "$DESC" "$URL" ci-bats
cucumber:
runs-on: ubuntu-latest
@@ -85,7 +98,15 @@ jobs:
repository: niko/gitea-ci-library
path: .ci
- name: Prepare cucumber
id: prepare-cucumber
shell: bash
run: |
npx --package @cucumber/cucumber cucumber-js --help
echo "TOOL_OK=true" >> "${GITHUB_ENV}"
- name: Run cucumber tests
if: env.TOOL_OK == 'true'
id: cucumber-tests
shell: bash
run: |
@@ -99,7 +120,7 @@ jobs:
exit ${CUCUMBER_EXIT}
- name: Publish cucumber reports
if: always()
if: env.TOOL_OK == 'true'
shell: bash
run: |
bash .ci/scripts/publish-git-pages.sh "reports/${GITHUB_SHA:0:8}/cucumber"
@@ -108,17 +129,20 @@ jobs:
if: always()
shell: bash
run: |
if [ "${CUCUMBER_EXIT}" = "0" ]; then
if [ "${TOOL_OK}" != "true" ]; then
STATUS="failure"
DESC="Cucumber tool unavailable"
URL="https://gitea.app.keskikuja.site/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
elif [ "${CUCUMBER_EXIT}" = "0" ]; then
STATUS="success"
DESC="Cucumber tests passed"
URL="https://${PAGES_HOST}/${GITHUB_REPOSITORY}/reports/${GITHUB_SHA:0:8}/cucumber/"
else
STATUS="failure"
DESC="Cucumber tests FAILED"
URL="https://${PAGES_HOST}/${GITHUB_REPOSITORY}/reports/${GITHUB_SHA:0:8}/cucumber/"
fi
bash .ci/scripts/report-status.sh "$STATUS" \
"$DESC" \
"https://${PAGES_HOST}/${GITHUB_REPOSITORY}/reports/${GITHUB_SHA:0:8}/cucumber/" \
ci-cucumber
bash .ci/scripts/report-status.sh "$STATUS" "$DESC" "$URL" ci-cucumber
build:
runs-on: ubuntu-latest