forked from DefectDojo/django-DefectDojo
-
Notifications
You must be signed in to change notification settings - Fork 0
138 lines (127 loc) · 4.79 KB
/
integration-tests.yml
File metadata and controls
138 lines (127 loc) · 4.79 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
name: Integration tests
on:
workflow_call:
jobs:
integration_tests:
# run tests with docker compose
name: User Interface Tests
runs-on: ubuntu-latest
strategy:
matrix:
test-case: [
"openapi-validatator",
"tests/action_history_test.py",
"tests/alerts_test.py",
"tests/announcement_banner_test.py",
"tests/banner_test.py",
"tests/base_test_class.py",
"tests/benchmark_test.py",
"tests/calendar_test.py",
"tests/check_various_pages.py",
"tests/close_old_findings_dedupe_test.py",
"tests/close_old_findings_test.py",
"tests/credential_test.py",
"tests/dashboard_test.py",
"tests/dedupe_test.py",
"tests/endpoint_extended_test.py",
"tests/endpoint_test.py",
"tests/engagement_checklist_test.py",
"tests/engagement_export_test.py",
"tests/engagement_extended_test.py",
"tests/engagement_presets_test.py",
"tests/engagement_test.py",
"tests/environment_test.py",
"tests/false_positive_history_test.py",
"tests/file_test.py",
"tests/finding_extended_test.py",
"tests/finding_group_test.py",
"tests/finding_test.py",
"tests/group_test.py",
"tests/login_test.py",
"tests/metrics_extended_test.py",
"tests/note_type_test.py",
"tests/notes_test.py",
"tests/notification_webhook_test.py",
"tests/notifications_test.py",
"tests/object_test.py",
"tests/product_credential_test.py",
"tests/product_group_test.py",
"tests/product_member_test.py",
"tests/product_metadata_test.py",
"tests/product_tag_metrics_test.py",
"tests/product_test.py",
"tests/product_type_group_test.py",
"tests/product_type_member_test.py",
"tests/product_type_test.py",
"tests/questionnaire_advanced_test.py",
"tests/questionnaire_test.py",
"tests/regulations_test.py",
"tests/reimport_scan_test.py",
"tests/report_builder_test.py",
"tests/risk_acceptance_test.py",
"tests/search_test.py",
"tests/sla_configuration_test.py",
"tests/system_settings_test.py",
"tests/test_copy_test.py",
"tests/test_test.py",
"tests/test_type_test.py",
"tests/threat_model_test.py",
"tests/tool_config.py",
"tests/tool_product_test.py",
"tests/tool_type_test.py",
"tests/user_profile_test.py",
"tests/user_test.py",
# "tests/import_scanner_test.py",
# "tests/zap.py",
]
os: [debian]
v3_feature_locations: [true, false]
exclude:
# standalone create endpoint page is gone in v3
- v3_feature_locations: true
test-case: "tests/endpoint_test.py"
fail-fast: false
env:
DD_V3_FEATURE_LOCATIONS: ${{ matrix.v3_feature_locations }}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
# load docker images from build jobs
- name: Load images from artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
path: built-docker-image
pattern: built-docker-image-*
merge-multiple: true
- name: Load docker images
timeout-minutes: 10
run: |-
docker load -i built-docker-image/nginx-alpine-linux-amd64_img
docker load -i built-docker-image/django-${{ matrix.os }}-linux-amd64_img
docker load -i built-docker-image/integration-tests-debian-linux-amd64_img
docker images
- name: Set integration-test mode
run: ln -s docker-compose.override.integration_tests.yml docker-compose.override.yml
- name: Start Dojo
run: docker compose up --no-deps -d postgres nginx celerybeat celeryworker mailhog uwsgi valkey
env:
DJANGO_VERSION: ${{ matrix.os }}
NGINX_VERSION: alpine
- name: Initialize
timeout-minutes: 10
run: docker compose up --no-deps --exit-code-from initializer initializer
env:
DJANGO_VERSION: ${{ matrix.os }}
NGINX_VERSION: alpine
- name: Integration tests
timeout-minutes: 10
run: docker compose up --no-deps --exit-code-from integration-tests integration-tests
env:
DD_INTEGRATION_TEST_FILENAME: ${{ matrix.test-case }}
INTEGRATION_TESTS_VERSION: debian
- name: Logs
if: always()
run: docker compose logs --tail="2500"
- name: Shutdown
if: always()
run: docker compose down