Use correct Docker image per Pyhon version
This commit is contained in:
@@ -1,5 +1,3 @@
|
|||||||
image: python:latest
|
|
||||||
|
|
||||||
# Change pip's cache directory to be inside the project directory since we can
|
# Change pip's cache directory to be inside the project directory since we can
|
||||||
# only cache local items.
|
# only cache local items.
|
||||||
variables:
|
variables:
|
||||||
@@ -15,6 +13,10 @@ cache:
|
|||||||
- .cache/pip
|
- .cache/pip
|
||||||
- venv/
|
- venv/
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- lint
|
||||||
|
- test
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- python -V
|
- python -V
|
||||||
- pip install virtualenv
|
- pip install virtualenv
|
||||||
@@ -22,11 +24,35 @@ before_script:
|
|||||||
- source venv/bin/activate
|
- source venv/bin/activate
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
|
stage: lint
|
||||||
script:
|
script:
|
||||||
- pip3 install black
|
- pip3 install black
|
||||||
- black --check src/
|
- black --check src/
|
||||||
|
|
||||||
test:
|
python-37:
|
||||||
|
stage: test
|
||||||
|
image: python:3.7
|
||||||
script:
|
script:
|
||||||
- pip3 install tox
|
- pip3 install tox
|
||||||
- tox
|
- tox -e py37
|
||||||
|
|
||||||
|
python-38:
|
||||||
|
stage: test
|
||||||
|
image: python:3.8
|
||||||
|
script:
|
||||||
|
- pip3 install tox
|
||||||
|
- tox -e py38
|
||||||
|
|
||||||
|
python-39:
|
||||||
|
stage: test
|
||||||
|
image: python:3.9
|
||||||
|
script:
|
||||||
|
- pip3 install tox
|
||||||
|
- tox -e py39
|
||||||
|
|
||||||
|
python-310:
|
||||||
|
stage: test
|
||||||
|
image: python:3.10
|
||||||
|
script:
|
||||||
|
- pip3 install tox
|
||||||
|
- tox -e py310
|
||||||
|
|||||||
Reference in New Issue
Block a user