2020-06-03 06:29:53 +00:00
|
|
|
stages:
|
2022-05-17 23:40:30 +00:00
|
|
|
- test
|
|
|
|
- lint
|
|
|
|
- release
|
2020-06-03 06:29:53 +00:00
|
|
|
|
2020-06-15 01:37:13 +00:00
|
|
|
python:
|
2022-05-17 23:40:30 +00:00
|
|
|
stage: test
|
|
|
|
image: python:3.10
|
|
|
|
services:
|
|
|
|
- name: liminspace/mjml-tcpserver:latest
|
|
|
|
alias: mjml
|
|
|
|
- postgres:14
|
|
|
|
variables:
|
|
|
|
POSTGRES_USER: postgres
|
|
|
|
POSTGRES_DB: birdsong
|
|
|
|
POSTGRES_PASSWORD: ""
|
|
|
|
POSTGRES_HOST_AUTH_METHOD: trust
|
|
|
|
before_script:
|
|
|
|
- pip3 install psycopg2-binary~=2.8.0 -e .
|
|
|
|
script:
|
|
|
|
- python3 runtests.py --no-input
|
|
|
|
|
2020-06-15 05:30:08 +00:00
|
|
|
flake8:
|
2022-05-17 23:40:30 +00:00
|
|
|
stage: lint
|
|
|
|
image: python:3.10
|
|
|
|
before_script:
|
|
|
|
- pip install flake8
|
|
|
|
script:
|
|
|
|
- flake8 birdsong/ tests/
|
2020-06-15 05:30:08 +00:00
|
|
|
|
|
|
|
isort:
|
2022-05-17 23:40:30 +00:00
|
|
|
stage: lint
|
|
|
|
image: python:3.10
|
|
|
|
before_script:
|
|
|
|
- pip install isort -e .
|
|
|
|
script:
|
|
|
|
- isort --recursive --diff --check-only birdsong/ tests/
|
2020-06-15 23:34:20 +00:00
|
|
|
|
|
|
|
build:
|
2022-05-17 23:40:30 +00:00
|
|
|
image: python:3.10
|
|
|
|
stage: release
|
|
|
|
before_script:
|
|
|
|
- pip install --upgrade setuptools wheel twine
|
|
|
|
script:
|
|
|
|
- ./setup.py sdist bdist_wheel
|
|
|
|
- twine upload dist/*
|
|
|
|
only:
|
|
|
|
- tags
|