äpkjoå¨0j
CI / Load gitea-env.conf to pipeline env (push) Successful in 13s
ci-bats Bats tests
ci-build Build complete
ci-check-running Checking version...
ci-check Build version 0.1.0 required
ci-cucumber Cucumber tests
CI / Build & Push Artifact (push) Has been cancelled
CI / Load gitea-env.conf to pipeline env (push) Successful in 13s
ci-bats Bats tests
ci-build Build complete
ci-check-running Checking version...
ci-check Build version 0.1.0 required
ci-cucumber Cucumber tests
CI / Build & Push Artifact (push) Has been cancelled
This commit is contained in:
@@ -34,15 +34,22 @@ jobs:
|
||||
path: .ci
|
||||
|
||||
- name: Validate CI config
|
||||
id: validate
|
||||
run: |
|
||||
bash .ci/scripts/report-status.sh pending "Validating CI config..." ci-validate-running
|
||||
bash .ci/scripts/ci-validate.sh
|
||||
bash .ci/scripts/report-status.sh success "CI config valid" ci-validate
|
||||
|
||||
- name: Report validate running
|
||||
- name: Report validate status
|
||||
if: always()
|
||||
run: |
|
||||
bash .ci/scripts/report-status.sh pending "Validating CI config..." ci-validate-running
|
||||
if [ "${{ steps.validate.outcome }}" = "success" ]; then
|
||||
bash .ci/scripts/report-status.sh success "Validating CI config..." ci-validate-running
|
||||
bash .ci/scripts/report-status.sh success "CI config valid" ci-validate
|
||||
else
|
||||
bash .ci/scripts/report-status.sh failure "Validating CI config..." ci-validate-running
|
||||
bash .ci/scripts/report-status.sh failure "CI validation FAILED" ci-validate
|
||||
exit 1
|
||||
fi
|
||||
|
||||
bats:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -57,6 +64,7 @@ jobs:
|
||||
id: bats-tests
|
||||
shell: bash
|
||||
run: |
|
||||
bash .ci/scripts/report-status.sh pending "Running Bats tests..." ci-bats-running
|
||||
docker volume create bats-workspace
|
||||
tar c . | docker run --rm -i -v bats-workspace:/data alpine tar x -C /data
|
||||
mkdir -p "reports/${GITHUB_SHA:0:8}/bats"
|
||||
@@ -73,11 +81,6 @@ jobs:
|
||||
echo "BATS_EXIT=${BATS_EXIT}" >> "${GITHUB_ENV}"
|
||||
exit ${BATS_EXIT}
|
||||
|
||||
- name: Report bats running
|
||||
if: always()
|
||||
run: |
|
||||
bash .ci/scripts/report-status.sh pending "Running Bats tests..." ci-bats-running
|
||||
|
||||
- name: Publish bats reports
|
||||
if: always()
|
||||
run: bash .ci/scripts/publish-git-pages.sh bats
|
||||
@@ -86,8 +89,10 @@ jobs:
|
||||
if: always()
|
||||
run: |
|
||||
if [ "${BATS_EXIT}" = "0" ]; then
|
||||
bash .ci/scripts/report-status.sh success "Running Bats tests..." ci-bats-running
|
||||
bash .ci/scripts/report-status.sh success "Bats tests OK" ci-bats bats
|
||||
else
|
||||
bash .ci/scripts/report-status.sh failure "Running Bats tests..." ci-bats-running
|
||||
bash .ci/scripts/report-status.sh failure "Bats tests FAILED" ci-bats bats
|
||||
fi
|
||||
|
||||
@@ -106,6 +111,7 @@ jobs:
|
||||
id: cucumber-tests
|
||||
shell: bash
|
||||
run: |
|
||||
bash .ci/scripts/report-status.sh pending "Running Cucumber tests..." ci-cucumber-running
|
||||
apt-get update -qq && apt-get install -y -qq --no-install-recommends lsof jq
|
||||
npm install @cucumber/cucumber > /dev/null 2>&1
|
||||
mkdir -p "reports/${GITHUB_SHA:0:8}/cucumber"
|
||||
@@ -114,26 +120,32 @@ jobs:
|
||||
--format json:"reports/${GITHUB_SHA:0:8}/cucumber/report.json" \
|
||||
--format html:"reports/${GITHUB_SHA:0:8}/cucumber/index.html" 2>&1
|
||||
CUCUMBER_EXIT=$?
|
||||
|
||||
STATE="success"
|
||||
[ "${CUCUMBER_EXIT}" != "0" ] && STATE="failure"
|
||||
if [ -f "reports/${GITHUB_SHA:0:8}/cucumber/index.html" ]; then
|
||||
bash .ci/scripts/report-status.sh "${STATE}" "Cucumber tests OK" ci-cucumber cucumber
|
||||
else
|
||||
bash .ci/scripts/report-status.sh "${STATE}" "Cucumber tests OK" ci-cucumber
|
||||
fi
|
||||
|
||||
echo "CUCUMBER_EXIT=${CUCUMBER_EXIT}" >> "${GITHUB_ENV}"
|
||||
exit ${CUCUMBER_EXIT}
|
||||
|
||||
- name: Report cucumber running
|
||||
if: always()
|
||||
run: |
|
||||
bash .ci/scripts/report-status.sh pending "Running Cucumber tests..." ci-cucumber-running
|
||||
|
||||
- name: Publish cucumber reports
|
||||
if: always()
|
||||
run: bash .ci/scripts/publish-git-pages.sh cucumber
|
||||
|
||||
- name: Set cucumber commit status
|
||||
if: always()
|
||||
run: |
|
||||
if [ "${CUCUMBER_EXIT}" = "0" ]; then
|
||||
bash .ci/scripts/report-status.sh success "Running Cucumber tests..." ci-cucumber-running
|
||||
if [ -f "reports/${GITHUB_SHA:0:8}/cucumber/index.html" ]; then
|
||||
bash .ci/scripts/report-status.sh success "Cucumber tests OK" ci-cucumber cucumber
|
||||
else
|
||||
bash .ci/scripts/report-status.sh success "Cucumber tests OK" ci-cucumber
|
||||
fi
|
||||
else
|
||||
bash .ci/scripts/report-status.sh failure "Running Cucumber tests..." ci-cucumber-running
|
||||
if [ -f "reports/${GITHUB_SHA:0:8}/cucumber/index.html" ]; then
|
||||
bash .ci/scripts/report-status.sh failure "Cucumber tests FAILED" ci-cucumber cucumber
|
||||
else
|
||||
bash .ci/scripts/report-status.sh failure "Cucumber tests FAILED" ci-cucumber
|
||||
fi
|
||||
fi
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [bats, cucumber]
|
||||
@@ -145,9 +157,19 @@ jobs:
|
||||
path: .ci
|
||||
|
||||
- name: Generate report index
|
||||
id: report-index
|
||||
run: |
|
||||
bash .ci/scripts/report-status.sh pending "Generating report index..." ci-build-running
|
||||
bash .ci/.gitea/scripts/generate-report-index.sh
|
||||
|
||||
- name: Set build commit status
|
||||
run: bash .ci/scripts/report-status.sh success "Build complete" ci-build
|
||||
if: always()
|
||||
run: |
|
||||
if [ "${{ steps.report-index.outcome }}" = "success" ]; then
|
||||
bash .ci/scripts/report-status.sh success "Generating report index..." ci-build-running
|
||||
bash .ci/scripts/report-status.sh success "Build complete" ci-build
|
||||
else
|
||||
bash .ci/scripts/report-status.sh failure "Generating report index..." ci-build-running
|
||||
bash .ci/scripts/report-status.sh failure "Build FAILED" ci-build
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user