-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (71 loc) · 2.55 KB
/
redis.yaml
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
name: CI - Redis lock
on:
push:
paths-ignore:
- 'webdocs/**'
- 'res/**'
pull_request:
permissions:
contents: read
jobs:
tests:
runs-on: ubuntu-latest
env:
NAME: ctfer
PASSWORD: ctfer
services:
chall-manager:
image: ctferio/chall-manager:v0.1.1@sha256:196f0e1ebf5c0c900b8be04560824538a30cb851baced98fa7276fce727aba95
ports:
- 8080:8080
redis-svc:
image: redis:7.0.10@sha256:92b8b307ee28ed74da17578064c73307ad41e43f422f0b7e4e91498b406c59e3
ports:
- 6379:6379
ctfd:
image: ctfd/ctfd:3.7.5@sha256:7f456b23727286c9df2b58e0b7398cc0196e2b74e4c1c5b3cda7a5b71034637d
ports:
- 8000:8000
options: --mount type=bind,source=${{ github.workspace }},target=/opt/CTFd/CTFd/plugins/ctfd-chall-manager
env:
LOG_LEVEL: DEBUG
PLUGIN_SETTINGS_CM_API_URL: http://chall-manager:8080/api/v1
PLUGIN_SETTINGS_CM_MANA_TOTAL: 10
REDIS_URL: redis://redis-svc:6379
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup basic testing env
uses: ./.github/workflows/setup-testing
with:
ctfd_mode: teams
ctfd_user: ${{ env.NAME }}
ctfd_pass: ${{ env.PASSWORD }}
- name: Setup Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
- name: Run Functional Tests in mode Teams
run: |-
python -m unittest test/test_api_challenges.py
python -m unittest test/test_api_admin_instance.py
python -m unittest test/test_api_instance.py
python -m unittest test/test_api_mana.py
env:
CTFD_URL: http://localhost:8000
- name: Update CTFd into mode users
uses: ctfer-io/ctfd-setup@4f039f18e2e78cb4eeb7a2c89e0c38a5a6afa392 # v1.5.2
with:
url: 'http://ctfd:8000'
appearance_name: CTFer.io
appearance_description: CTFer.io plugin tests
mode: users
admin_name: ${{ env.NAME }}
admin_email: [email protected]
admin_password: ${{ env.PASSWORD }}
- name: Run Functional Tests in mode Users
run: |-
python -m unittest test/test_api_challenges.py
python -m unittest test/test_api_admin_instance.py
python -m unittest test/test_api_instance.py
python -m unittest test/test_api_mana.py
env:
CTFD_URL: http://localhost:8000