Use correct Docker image per Pyhon version

This commit is contained in:
2021-11-27 22:01:47 -05:00
parent fcf777b50c
commit 6b086ca1a9
2 changed files with 31 additions and 5 deletions

View File

@@ -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

View File

@@ -28,7 +28,7 @@ console_scripts =
gbasm = gbasm.gbasm:main
[tox:tox]
envlist = py3{7,8,9}
envlist = py3{7,8,9,10}
[testenv]
deps = pytest