chore(specs): test scenarios toegevoegd #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: continuous integration | |
on: | |
push: | |
paths: | |
- features/** | |
- .github/workflows/ci.yml | |
- .docker/historie-data-service.yml | |
workflow_dispatch: | |
env: | |
NODE_VERSION: '20' | |
DATA_SERVICE_DOCKER_FILE_PATH: .docker/historie-data-service.yml | |
jobs: | |
continuous-integration: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Haal build run identifier uit Docker manifest | |
id: build-run-id | |
uses: ./.github/actions/haal-build-run-identifier-uit-docker-manifest | |
with: | |
path-docker-manifest: ${{ env.DATA_SERVICE_DOCKER_FILE_PATH }} | |
- name: Haal versie uit Docker manifest | |
id: app-version | |
uses: ./.github/actions/haal-versie-uit-docker-manifest | |
with: | |
path-docker-manifest: ${{ env.DATA_SERVICE_DOCKER_FILE_PATH }} | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Login to P5 Container Registry | |
uses: docker/[email protected] | |
with: | |
registry: haalcentraal.azurecr.io | |
username: ${{ secrets.P5_CR_USER }} | |
password: ${{ secrets.P5_CR_PWD }} | |
- name: Set run permissions on script folder | |
uses: ./.github/actions/zet-run-bash-scripts-permission | |
with: | |
path-bash-file-or-folder: ./scripts/* | |
- name: Start containers | |
run: | | |
./scripts/containers-start.sh ci | |
- name: Wait for DB restart | |
run: sleep 5s | |
shell: bash | |
- name: Validate functional specs | |
run: | | |
./scripts/specs-verify.sh | |
- name: Stop containers | |
if: always() | |
run: | | |
./scripts/containers-stop.sh ci | |
- name: Genereer test rapportage | |
if: always() | |
run: | | |
node ./scripts/generate-cucumber-reports.js ${{ steps.app-version.outputs.version }} ${{ steps.build-run-id.outputs.build_run }} ${{ github.ref_name }} | |
- name: Upload test rapportage | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Reports | |
path: test-reports | |
- name: Push test rapportage naar brp-api.github.io repo | |
if: always() | |
uses: tech-thinker/push-to-repo@main | |
env: | |
API_TOKEN_GITHUB: ${{ secrets.GIT_PAT_TOKEN }} | |
with: | |
source-directory: test-reports/cucumber-js/reports | |
destination-repository-name: brp-api.github.io | |
destination-github-username: BRP-API | |
target-branch: test-reports/historie | |
commit-message: "test rapporten van build: ${{ steps.build-run-id.outputs.build-run }}" |