-
-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (51 loc) · 2.54 KB
/
test_runner.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
name: IRPI_UP CI tests
on: [push, pull_request]
jobs:
ci_tests:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
repository: 'g3w-suite/g3w-admin'
- uses: actions/checkout@v4
with:
path: 'qpdnd'
- name: Move QPDND inside G3W-ADMIN
run: mv qpdnd/qpdnd g3w-admin/ && mv qpdnd/requirements.txt g3w-admin/qpdnd/ && echo "$(ls -lh g3w-admin/qpdnd)"
- name: Starting Docker compose
run: docker compose -f docker-compose.ltr.yml up -d
- name: Copying code into the container
run: |
docker cp ./ "$(docker compose -f docker-compose.ltr.yml ps -q g3w-suite)":/code
- name: Installing G3W-ADMIN Python requirements
run: |
docker compose -f docker-compose.ltr.yml exec -T g3w-suite sh -c "cd /code/ && pip3 install -r requirements_docker.txt && pip3 install -r requirements_huey.txt"
- name: Activate QPDND module
run: |
docker compose -f docker-compose.ltr.yml exec -T g3w-suite sh -c "echo \"G3WADMIN_LOCAL_MORE_APPS = ['qpdnd']\" >> /code/settings_docker.py"
- name: Install QPDND python requirements
run: |
docker compose -f docker-compose.ltr.yml exec -T g3w-suite sh -c "cd /code/ && pip3 install -r g3w-admin/qpdnd/requirements.txt"
- name: Building g3w-suite
run: |
docker compose -f docker-compose.ltr.yml exec -T g3w-suite sh -c "/code/ci_scripts/build_suite.sh"
- name: Setting up g3w-suite
run: |
docker compose -f docker-compose.ltr.yml exec -T g3w-suite sh -c "/code/ci_scripts/setup_suite.sh"
- name: Starting Django
run: |
docker compose -f docker-compose.ltr.yml exec -T g3w-suite sh -c "cd /code/g3w-admin && python3 manage.py runserver 0.0.0.0:8000" &
- name: Waiting for Django
run: |
docker compose -f docker-compose.ltr.yml exec -T g3w-suite sh -c "wait-for-it -h localhost -p 8000 -t 240"
- name: Write PDND priv key to file
run: |
docker compose -f docker-compose.ltr.yml exec -T g3w-suite sh -c "echo '${{ secrets.BARI_PDND_PRIV_KEY }}' > /code/g3w-admin/qpdnd/tests/data/pdnd/keys/api-pdnd-coll-keypair.rsa.priv"
- name: Running QPDND tests
run: |
docker compose -f docker-compose.ltr.yml exec -T g3w-suite sh -c "cd /code/g3w-admin && BARI_PDND_PRIV_KEY='/code/g3w-admin/qpdnd/tests/data/pdnd/keys/api-pdnd-coll-keypair.rsa.priv' python3 manage.py test qpdnd"
- name: Setup tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
with:
limit-access-to-actor: true