-
Notifications
You must be signed in to change notification settings - Fork 3
145 lines (139 loc) · 4.41 KB
/
post-deploy.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
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
on:
# Triggers the workflow on push or pull request events but only for the main branch
workflow_call:
inputs:
assets_required:
required: false
default: false
type: boolean
postgres_unit_testing:
required: false
default: false
type: boolean
db_name:
required: false
default: "postgres_db"
type: string
run_performance_tests:
required: false
default: false
type: boolean
run_e2e_tests_application:
required: false
default: true
type: boolean
run_e2e_tests_assessment:
required: false
default: true
type: boolean
run_static_security_python:
required: false
default: true
type: boolean
app_name:
required: false
type: string
environment:
required: true
type: string
default: test
run_zap_scan:
required: false
default: false
type: boolean
secrets:
FSD_GH_APP_ID:
required: true
FSD_GH_APP_KEY:
required: true
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
assets_required:
required: false
default: false
type: boolean
postgres_unit_testing:
required: false
default: false
type: boolean
db_name:
required: false
default: "postgres_db"
type: string
run_performance_tests:
required: false
default: false
type: boolean
run_e2e_tests_application:
required: false
default: true
type: boolean
run_e2e_tests_assessment:
required: false
default: true
type: boolean
run_static_security_python:
required: false
default: true
type: boolean
app_name:
required: false
type: string
environment:
required: true
type: string
default: test
run_zap_scan:
required: false
default: false
type: boolean
jobs:
run_shared_tests_aws:
concurrency: run_shared_tests_aws
uses: ./.github/workflows/run-shared-tests.yml
with:
perf_test_target_url_application_store: http://fsd-application-store:8080
perf_test_target_url_fund_store: https://fsd-fund-store:8080
perf_test_target_url_assessment_store: https://fsd-assessment-store:8080
e2e_tests_target_url_frontend: https://fsd:fsd@frontend.${{ inputs.environment }}.access-funding.test.levellingup.gov.uk
e2e_tests_target_url_authenticator: https://fsd:fsd@authenticator.${{ inputs.environment }}.access-funding.test.levellingup.gov.uk
e2e_tests_target_url_form_runner: https://fsd:fsd@forms.${{ inputs.environment }}.access-funding.test.levellingup.gov.uk
e2e_tests_target_url_assessment: https://fsd:fsd@assessment.${{ inputs.environment }}.access-funding.test.levellingup.gov.uk
# run_performance_tests: ${{inputs.run_performance_tests}}
run_performance_tests: false
run_e2e_tests_assessment: ${{inputs.run_e2e_tests_assessment}}
run_e2e_tests_application: ${{inputs.run_e2e_tests_application}}
secrets:
FSD_GH_APP_ID: ${{ secrets.FSD_GH_APP_ID }}
FSD_GH_APP_KEY: ${{ secrets.FSD_GH_APP_KEY }}
static_security_python:
if: ${{ inputs.run_static_security_python == true}}
runs-on: ubuntu-latest
environment: dev
steps:
- name: checkout code
uses: actions/checkout@v4
- name: checkout app code
uses: actions/checkout@v4
with:
repository: communitiesuk/funding-service-design-${{inputs.app_name}}
path: ${{inputs.app_name}}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.10.x
- name: install dependencies
run: python -m pip install --upgrade pip && python -m pip install -r ${{inputs.app_name}}/requirements-dev.txt bandit==1.7.4
- name: Bandit
run: bandit -r ${{inputs.app_name}}/app
zap-scan-aws:
if: inputs.app_name != '' && inputs.run_zap_scan == true
runs-on: ubuntu-latest
environment: test
steps:
- name: ZAP Scan
uses: zaproxy/[email protected]
with:
target: 'https://${{inputs.app_name}}.${{ inputs.environment }}.access-funding.test.levellingup.gov.uk/'
allow_issue_writing: False