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