Skip to content

Commit 5c7e1c5

Browse files
HongyuLiiHongyu Li
andauthored
python version tests (#16)
* python version tests * readme Co-authored-by: Hongyu Li <hongyu.li@jitsuin.com>
1 parent d64f266 commit 5c7e1c5

4 files changed

Lines changed: 81 additions & 2 deletions

File tree

BUILDING.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,64 @@ Note that this requires credentials and will only normally be done by a Jitsuin
5656
representative.
5757

5858

59+
## Testing Other Python Versions
60+
61+
To build the docker builder image with default Python version 3.6:
62+
```bash
63+
task builder
64+
```
65+
66+
To check the style
67+
```bash
68+
task check
69+
```
70+
71+
To run the unittests:
72+
```bash
73+
task unittests
74+
```
75+
76+
To build the docker builder image with Python 3.7:
77+
```bash
78+
task builder-3.7
79+
```
80+
81+
To check the style
82+
```bash
83+
task check
84+
```
85+
86+
To run the unittests:
87+
```bash
88+
task unittests
89+
```
90+
91+
To build the docker builder image with Python 3.7:
92+
```bash
93+
task builder-3.8
94+
```
95+
96+
To check the style
97+
```bash
98+
task check
99+
```
100+
101+
To run the unittests:
102+
```bash
103+
task unittests
104+
```
105+
106+
To build the docker builder image with Python 3.7:
107+
```bash
108+
task builder-3.8
109+
```
110+
111+
To check the style
112+
```bash
113+
task check
114+
```
115+
116+
To run the unittests:
117+
```bash
118+
task unittests
119+
```

Dockerfile-builder

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
FROM python:3.6-buster
1+
ARG VERSION=3.6
2+
FROM python:${VERSION}-buster
23

34
COPY requirements.txt requirements-dev.txt /tmp/
45

Taskfile.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,28 @@ tasks:
1212
builder:
1313
desc: Build a docker environment with the right dependencies and utilities
1414
cmds:
15-
- docker build --no-cache -f Dockerfile-builder -t jitsuin-archivist-python-builder .
15+
- docker build --no-cache --build-arg 3.6 -f Dockerfile-builder -t jitsuin-archivist-python-builder .
16+
17+
builder-3.7:
18+
desc: Build a docker environment with the right dependencies and utilities
19+
cmds:
20+
- docker build --no-cache --build-arg 3.7 -f Dockerfile-builder -t jitsuin-archivist-python-builder .
21+
22+
builder-3.8:
23+
desc: Build a docker environment with the right dependencies and utilities
24+
cmds:
25+
- docker build --no-cache --build-arg 3.8 -f Dockerfile-builder -t jitsuin-archivist-python-builder .
26+
27+
builder-3.9:
28+
desc: Build a docker environment with the right dependencies and utilities
29+
cmds:
30+
- docker build --no-cache --build-arg 3.9 -f Dockerfile-builder -t jitsuin-archivist-python-builder .
1631

1732
check:
1833
desc: Check the style, bug and quality of the code
1934
deps: [about]
2035
cmds:
36+
- ./scripts/builder.sh python3 --version
2137
- ./scripts/builder.sh pycodestyle --format=pylint archivist unittests examples
2238
- ./scripts/builder.sh python3 -m pylint --rcfile=pylintrc archivist unittests examples
2339

scripts/unittests.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#
33
# run unittests
44
#
5+
python3 --version
56

67
rm -f coverage.xml
78
rm -rf htmlcov

0 commit comments

Comments
 (0)