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
|
||||
# only cache local items.
|
||||
variables:
|
||||
@@ -15,6 +13,10 @@ cache:
|
||||
- .cache/pip
|
||||
- venv/
|
||||
|
||||
stages:
|
||||
- lint
|
||||
- test
|
||||
|
||||
before_script:
|
||||
- python -V
|
||||
- pip install virtualenv
|
||||
@@ -22,11 +24,35 @@ before_script:
|
||||
- source venv/bin/activate
|
||||
|
||||
lint:
|
||||
stage: lint
|
||||
script:
|
||||
- pip3 install black
|
||||
- black --check src/
|
||||
|
||||
test:
|
||||
python-37:
|
||||
stage: test
|
||||
image: python:3.7
|
||||
script:
|
||||
- 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