-
Notifications
You must be signed in to change notification settings - Fork 1.9k
104 lines (92 loc) · 3.31 KB
/
integration-tests.yml
File metadata and controls
104 lines (92 loc) · 3.31 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
name: Integration tests
on:
workflow_call:
inputs:
auditlog_type:
type: string
default: "django-auditlog"
jobs:
integration_tests:
# run tests with docker compose
name: User Interface Tests
runs-on: ubuntu-latest
env:
AUDITLOG_TYPE: ${{ inputs.auditlog_type }}
strategy:
matrix:
test-case: [
"tests/finding_test.py",
"tests/report_builder_test.py",
"tests/notes_test.py",
"tests/regulations_test.py",
"tests/product_type_test.py",
"tests/product_test.py",
"tests/endpoint_test.py",
"tests/engagement_test.py",
"tests/environment_test.py",
"tests/test_test.py",
"tests/user_test.py",
"tests/group_test.py",
"tests/product_group_test.py",
"tests/product_type_group_test.py",
"tests/product_member_test.py",
"tests/product_type_member_test.py",
"tests/ibm_appscan_test.py",
"tests/search_test.py",
"tests/file_test.py",
"tests/dedupe_test.py",
"tests/announcement_banner_test.py",
"tests/close_old_findings_dedupe_test.py",
"tests/close_old_findings_test.py",
"tests/false_positive_history_test.py",
"tests/check_various_pages.py",
# "tests/import_scanner_test.py",
# "tests/zap.py",
"tests/notifications_test.py",
"tests/tool_config.py",
"openapi-validatator",
]
os: [alpine, debian]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
# load docker images from build jobs
- name: Load images from artifacts
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
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