-
Notifications
You must be signed in to change notification settings - Fork 133
/
tox.ini
60 lines (59 loc) · 2.38 KB
/
tox.ini
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
[tox]
min_version = 4.0
no_package = true
env_list =
py311
[testenv]
allowlist_externals = sh
usedevelop = True
deps =
-r unittest_requirements.txt
epdb
setenv =
# LOCK_REQUIREMENTS=0
DJANGO_SETTINGS_MODULE=pulpcore.app.settings
PULP_DATABASES__default__ENGINE=django.db.backends.postgresql
PULP_DATABASES__default__NAME=galaxy_ng
PULP_DATABASES__default__USER=galaxy_ng
PULP_DATABASES__default__PASSWORD=galaxy_ng
PULP_DATABASES__default__HOST=localhost
PULP_DATABASES__default__PORT=5433
#PULP_INSTALLED_APPS="[galaxy_ng]"
PULP_DB_ENCRYPTION_KEY=/tmp/database_fields.symmetric.key
PULP_RH_ENTITLEMENT_REQUIRED=insights
PULP_DEPLOY_ROOT=/tmp/pulp
PULP_STATIC_ROOT=/tmp/pulp
PULP_WORKING_DIRECTORY=/tmp/pulp/tmp
PULP_MEDIA_ROOT=/tmp/pulp/media
PULP_FILE_UPLOAD_TEMP_DIR=/tmp/pulp/artifact-tmp
commands =
sh -c ' \
docker compose -f dev/compose/aap.yaml up --force-recreate -d postgres && \
docker compose -f dev/compose/aap.yaml exec postgres bash -c "while ! pg_isready -U galaxy_ng; do sleep 1; done" && \
rm -rf /tmp/pulp && \
mkdir -p /tmp/pulp && \
mkdir -p /tmp/pulp/tmp && \
mkdir -p /tmp/pulp/artifact-tmp && \
mkdir -p /tmp/pulp/media && \
mkdir -p /tmp/pulp/assets && \
if [ ! -f /tmp/database_fields.symmetric.key ]; then \
openssl rand -base64 32 > /tmp/database_fields.symmetric.key; \
fi && \
if [ -d ../django-ansible-base ]; then pip install -e ../django-ansible-base; fi && \
(pip show galaxy_ng || pip install -e .) && \
if [ -d ../pulpcore ]; then pip install -e ../pulpcore; fi && \
if [ -d ../pulp_ansible ]; then pip install -e ../pulp_ansible; fi && \
if [ -d ../galaxy-importer ]; then pip install -e ../galaxy-importer; fi && \
if [ -d ../dynaconf ]; then pip install -e ../dynaconf; fi && \
if [ -d ../django ]; then pip install -e ../django; fi && \
if [ -d ../django-rest-framework ]; then pip install -e ../django-rest-framework; fi && \
pytest \
--log-cli-level=DEBUG \
--capture=no -v \
-p 'no:pulpcore' \
-p 'no:pulp_ansible' \
--cov-report xml:coverage.xml \
--cov=galaxy_ng \
--junit-xml=/tmp/galaxy_ng-test-results.xml \
--pyargs "galaxy_ng.tests.unit" \
'