Skip to content

Commit b1c221b

Browse files
committed
deployment 4/n
1 parent 2d93794 commit b1c221b

4 files changed

Lines changed: 41 additions & 12 deletions

File tree

build-requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pylint
2+
setuptools
3+
wheel

build.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
set -xeo pipefail
4+
5+
python3 -m venv /venv
6+
set +x
7+
source /venv/bin/activate
8+
echo "VIRTUAL_ENV=$VIRTUAL_ENV"
9+
set -x
10+
pip3 install --upgrade pip
11+
12+
pip3 install -r build-requirements.txt
13+
pip3 install .
14+
python3 -m unittest -v
15+
pylint -E datapath setup.py docs.py
16+
python3 docs.py
17+
18+
python3 setup.py sdist
19+
python3 setup.py bdist_wheel

pre_deploy.sh

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,9 @@
22

33
set -xeo pipefail
44

5-
if [[ -e "$(echo *venv*)" ]]; then
6-
source *venv*/bin/activate
7-
else
8-
echo 'no venv found'
9-
exit 1
10-
fi
5+
build_version='3.10'
6+
docker run -it --rm -v "$PWD:/repo" -w /repo "python:$build_version" '/repo/build.sh'
117

12-
python3 -m unittest -v
13-
pylint -E datapath setup.py docs.py
14-
python3 docs.py
15-
16-
python3 setup.py sdist
17-
python3 setup.py bdist_wheel
8+
for version in '3.10' '3.11' '3.12'; do
9+
docker run -it --rm -v "$PWD/dist:/dist" -v "$PWD/test:/repo/test" -w /repo "python:$version" '/repo/test/docker_test.sh'
10+
done

test/docker_test.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
set -xeo pipefail
4+
5+
python3 -m venv /venv
6+
set +x
7+
source /venv/bin/activate
8+
echo "VIRTUAL_ENV=$VIRTUAL_ENV"
9+
set -x
10+
11+
pip3 install --upgrade pip
12+
pip3 install /dist/*.whl
13+
cd /repo
14+
python3 -m unittest -v

0 commit comments

Comments
 (0)