-
Notifications
You must be signed in to change notification settings - Fork 3
156 lines (151 loc) · 6.82 KB
/
Copy pathmain.yaml
File metadata and controls
156 lines (151 loc) · 6.82 KB
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# This is the main workflow which will orchestrate the other workflows:
name: main
on:
push:
branches: [develop, main]
pull_request:
branches: [develop, main]
types: [opened, synchronize, reopened, labeled]
workflow_dispatch:
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
PGUSER: postgres
jobs:
check-nx-affected:
runs-on: ubuntu-latest
timeout-minutes: 30
outputs:
nx_affected_e2e: ${{ steps.check-nx-affected.outputs.NX_AFFECTED_E2E }}
steps:
- name: Checkout
uses: actions/checkout@v7
with:
fetch-depth: 0
sparse-checkout: |
bciers/
.github/
.tool-versions
bc_obps/.tool-versions
- name: dev env setup
uses: ./.github/actions/dev-env-setup-frontend
- name: check nx affected target e2e:ci projects and save output
id: check-nx-affected
run: |
NX_AFFECTED_E2E=$(yarn nx show projects --affected --with-target e2e:ci --base=origin/develop)
echo "NX_AFFECTED_E2E="$NX_AFFECTED_E2E"" >> "$GITHUB_OUTPUT"
working-directory: ./bciers
shell: bash
check-backend-changes:
uses: ./.github/workflows/check-backend-changes.yaml
check-frontend-changes:
uses: ./.github/workflows/check-frontend-changes.yaml
build-administration:
uses: ./.github/workflows/build-administration.yaml
build-backend:
uses: ./.github/workflows/build-backend.yaml
build-compliance:
uses: ./.github/workflows/build-compliance.yaml
build-dashboard:
uses: ./.github/workflows/build-dashboard.yaml
build-dashboard-e2e:
uses: ./.github/workflows/build-dashboard-e2e.yaml
build-registration:
uses: ./.github/workflows/build-registration.yaml
build-reporting:
uses: ./.github/workflows/build-reporting.yaml
test-code:
needs: [check-nx-affected, check-backend-changes, check-frontend-changes]
uses: ./.github/workflows/test-code.yaml
with:
backend_has_changes: ${{ (needs.check-backend-changes.outputs.has_changes || contains(github.event.pull_request.labels.*.name, 'run-all-ci')) && 'true' || 'false' }}
frontend_has_changes: ${{ (needs.check-frontend-changes.outputs.has_changes || contains(github.event.pull_request.labels.*.name, 'run-all-ci')) && 'true' || 'false' }}
test-backend:
needs: [check-backend-changes]
uses: ./.github/workflows/test-backend.yaml
with:
backend_has_changes: ${{ (needs.check-backend-changes.outputs.has_changes || contains(github.event.pull_request.labels.*.name, 'run-all-ci')) && 'true' || 'false' }}
secrets: inherit
test-administration-e2e:
needs:
[
build-backend,
build-dashboard-e2e,
build-administration,
check-nx-affected,
]
uses: ./.github/workflows/test-nx-project-e2e.yaml
with:
all_happo_browsers: ${{ github.ref_name == 'main' || github.head_ref == 'main' || contains(github.ref_name, 'release') || contains(github.head_ref, 'release') }}
compose_profiles: "administration"
is_nx_affected: ${{contains(needs.check-nx-affected.outputs.nx_affected_e2e, 'administration') || github.ref_name == 'develop' || github.ref_name == 'main' || github.head_ref == 'develop' || github.head_ref == 'main' || contains(github.event.pull_request.labels.*.name, 'run-all-ci') }}
nx_project: administration
secrets: inherit
test-registration-e2e:
needs:
[
build-backend,
build-dashboard-e2e,
build-registration,
check-nx-affected,
]
uses: ./.github/workflows/test-nx-project-e2e.yaml
with:
all_happo_browsers: ${{ github.ref_name == 'main' || github.head_ref == 'main' || contains(github.ref_name, 'release') || contains(github.head_ref, 'release') }}
compose_profiles: "registration"
is_nx_affected: ${{contains(needs.check-nx-affected.outputs.nx_affected_e2e, 'registration') || github.ref_name == 'develop' || github.ref_name == 'main' || github.head_ref == 'develop' || github.head_ref == 'main' || contains(github.event.pull_request.labels.*.name, 'run-all-ci') }}
nx_project: registration
secrets: inherit
test-dashboard-e2e:
needs:
[
build-administration,
build-backend,
build-compliance,
build-dashboard-e2e,
build-registration,
build-reporting,
check-nx-affected,
]
uses: ./.github/workflows/test-nx-project-e2e.yaml
with:
all_happo_browsers: ${{ github.ref_name == 'main' || github.head_ref == 'main' || contains(github.ref_name, 'release') || contains(github.head_ref, 'release') }}
# dashboard e2e clicks through to every app tile, so every app has to be up
compose_profiles: "administration,compliance,registration,reporting"
is_nx_affected: ${{contains(needs.check-nx-affected.outputs.nx_affected_e2e, 'dashboard') || github.ref_name == 'develop' || github.ref_name == 'main' || github.head_ref == 'develop' || github.head_ref == 'main' || contains(github.event.pull_request.labels.*.name, 'run-all-ci') }}
nx_project: dashboard
secrets: inherit
test-compliance-e2e:
needs:
[
build-backend,
build-compliance,
build-dashboard-e2e,
build-reporting,
check-nx-affected,
]
uses: ./.github/workflows/test-nx-project-e2e.yaml
with:
all_happo_browsers: ${{ github.ref_name == 'main' || github.head_ref == 'main' || contains(github.ref_name, 'release') || contains(github.head_ref, 'release') }}
# compliance e2e drives the reporting UI directly to seed its data
# (its specs import @/reporting-e2e POMs), so reporting has to be up too
compose_profiles: "compliance,reporting"
is_nx_affected: ${{contains(needs.check-nx-affected.outputs.nx_affected_e2e, 'compliance') || github.ref_name == 'develop' || github.ref_name == 'main' || github.head_ref == 'develop' || github.head_ref == 'main' || contains(github.event.pull_request.labels.*.name, 'run-all-ci') }}
nx_project: compliance
secrets: inherit
test-reporting-e2e:
needs:
[build-backend, build-dashboard-e2e, build-reporting, check-nx-affected]
uses: ./.github/workflows/test-nx-project-e2e.yaml
with:
all_happo_browsers: ${{ github.ref_name == 'main' || github.head_ref == 'main' || contains(github.ref_name, 'release') || contains(github.head_ref, 'release') }}
compose_profiles: "reporting"
is_nx_affected: ${{contains(needs.check-nx-affected.outputs.nx_affected_e2e, 'reporting') || github.ref_name == 'develop' || github.ref_name == 'main' || github.head_ref == 'develop' || github.head_ref == 'main' || contains(github.event.pull_request.labels.*.name, 'run-all-ci') }}
nx_project: reporting
secrets: inherit
trivy:
uses: ./.github/workflows/trivy.yaml
codeql:
uses: ./.github/workflows/codeql.yaml