Skip to content

Merge pull request #9 from g3w-suite/check_license #84

Merge pull request #9 from g3w-suite/check_license

Merge pull request #9 from g3w-suite/check_license #84

Workflow file for this run

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