generated from BRP-API/brp-shared
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (77 loc) · 2.69 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
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 }}"