Add CI/build infrastructure

This commit is contained in:
2021-11-27 21:31:48 -05:00
parent 3724bcff8b
commit 4f04c78701
4 changed files with 85 additions and 0 deletions

31
.gitlab-ci.yml Normal file
View File

@@ -0,0 +1,31 @@
image: python:latest
# Change pip's cache directory to be inside the project directory since we can
# only cache local items.
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
# Pip's cache doesn't store the python packages
# https://pip.pypa.io/en/stable/reference/pip_install/#caching
#
# If you want to also cache the installed packages, you have to install
# them in a virtualenv and cache it as well.
cache:
paths:
- .cache/pip
- venv/
before_script:
- python -V
- pip install virtualenv
- virtualenv venv
- source venv/bin/activate
lint:
script:
- pip3 install black
- black --check src/
test:
script:
- pip3 install tox