-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun-tests.sh
executable file
·49 lines (35 loc) · 1.21 KB
/
run-tests.sh
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
#!/bin/bash
set -e
OAREPO_VERSION=${OAREPO_VERSION:-12}
PYTHON=${PYTHON:-python3}
export PIP_EXTRA_INDEX_URL=https://gitlab.cesnet.cz/api/v4/projects/1408/packages/pypi/simple
export UV_EXTRA_INDEX_URL=https://gitlab.cesnet.cz/api/v4/projects/1408/packages/pypi/simple
if [ -d .venv-builder ] ; then
rm -rf .venv-builder
fi
${PYTHON} -m venv .venv-builder
.venv-builder/bin/pip install -U setuptools pip wheel
.venv-builder/bin/pip install oarepo-model-builder
BUILDER=.venv-builder/bin/oarepo-compile-model
if true ; then
test -d model-a && rm -rf model-a
test -d model-b && rm -rf model-b
${BUILDER} tests/modela.yaml --output-directory model-a -vvv
${BUILDER} tests/modelb.yaml --output-directory model-b -vvv
.venv-builder/bin/pip install oarepo-model-builder-drafts
${BUILDER} tests/modelc.yaml --output-directory model-c -vvv
fi
if [ -d .venv-tests ] ; then
rm -rf .venv-tests
fi
${PYTHON} -m venv .venv-tests
source .venv-tests/bin/activate
pip install -U setuptools pip wheel
pip install pyyaml opensearch-dsl
pip install "oarepo[tests,s3,rdm]==${OAREPO_VERSION}.*"
pip install oarepo-ui
pip install -e .
pip install -e model-a
pip install -e model-b
pip install -e model-c
pytest tests