poc jatkuu
This commit is contained in:
@@ -2,18 +2,24 @@ name: Build Feature
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
env_json:
|
||||
required: true
|
||||
type: string
|
||||
bats-image:
|
||||
required: true
|
||||
type: string
|
||||
cucumber-node-image:
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
GITEA_TOKEN:
|
||||
required: true
|
||||
GIT_PAGES_PUBLISH_TOKEN:
|
||||
required: true
|
||||
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
GIT_PAGES_PUBLISH_TOKEN: ${{ secrets.GIT_PAGES_PUBLISH_TOKEN }}
|
||||
|
||||
jobs:
|
||||
bats:
|
||||
validate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -25,6 +31,19 @@ jobs:
|
||||
- name: Validate CI config
|
||||
run: bash .ci/scripts/ci-validate.sh
|
||||
|
||||
bats:
|
||||
runs-on: ubuntu-latest
|
||||
needs: validate
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
repository: niko/gitea-ci-library
|
||||
path: .ci
|
||||
|
||||
- name: Load env
|
||||
run: grep -v '^#' .gitea/workflows/feature-env.conf >> "$GITHUB_ENV"
|
||||
|
||||
- name: Run bats tests
|
||||
id: bats-tests
|
||||
shell: bash
|
||||
@@ -46,13 +65,10 @@ jobs:
|
||||
|
||||
- name: Publish bats reports
|
||||
if: always()
|
||||
shell: bash
|
||||
run: |
|
||||
bash .ci/scripts/publish-git-pages.sh bats
|
||||
run: bash .ci/scripts/publish-git-pages.sh bats
|
||||
|
||||
- name: Set bats commit status
|
||||
if: always()
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "${BATS_EXIT}" = "0" ]; then
|
||||
bash .ci/scripts/report-status.sh success "Bats tests" ci-bats bats
|
||||
@@ -62,6 +78,7 @@ jobs:
|
||||
|
||||
cucumber:
|
||||
runs-on: ubuntu-latest
|
||||
needs: validate
|
||||
container:
|
||||
image: ${{ inputs.cucumber-node-image }}
|
||||
steps:
|
||||
@@ -71,8 +88,8 @@ jobs:
|
||||
repository: niko/gitea-ci-library
|
||||
path: .ci
|
||||
|
||||
- name: Validate CI config
|
||||
run: bash .ci/scripts/ci-validate.sh
|
||||
- name: Load env
|
||||
run: grep -v '^#' .gitea/workflows/feature-env.conf >> "$GITHUB_ENV"
|
||||
|
||||
- name: Prepare cucumber
|
||||
id: prepare-cucumber
|
||||
@@ -106,7 +123,6 @@ jobs:
|
||||
|
||||
- name: Publish cucumber reports
|
||||
if: always()
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "${TOOL_OK}" = "true" ]; then
|
||||
bash .ci/scripts/publish-git-pages.sh cucumber
|
||||
@@ -114,7 +130,6 @@ jobs:
|
||||
|
||||
- name: Set cucumber commit status
|
||||
if: always()
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "${TOOL_OK}" != "true" ]; then
|
||||
bash .ci/scripts/report-status.sh failure "Cucumber tool unavailable" ci-cucumber
|
||||
@@ -134,13 +149,11 @@ jobs:
|
||||
repository: niko/gitea-ci-library
|
||||
path: .ci
|
||||
|
||||
- name: Validate CI config
|
||||
run: bash .ci/scripts/ci-validate.sh
|
||||
- name: Load env
|
||||
run: grep -v '^#' .gitea/workflows/feature-env.conf >> "$GITHUB_ENV"
|
||||
|
||||
- name: Generate report index
|
||||
shell: bash
|
||||
run: 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
|
||||
run: bash .ci/scripts/report-status.sh success "Build complete" ci-build
|
||||
|
||||
Reference in New Issue
Block a user