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

View File

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