summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
blob: 5919ed84fba4ef189bd22bdd3799462c17a2b1fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
image: python:latest

build_pypi_packages:
  stage: build
  only:
    - master
  before_script:
    - pip install build
  script:
    - python -m build

deploy_to_pypi:
  stage: deploy
  only:
    - master
  before_script:
    - pip install twine
  script:
    - TWINE_PASSWORD=$PYPI_PASSWORD TWINE_USERNAME=$PYPI_USERNAME python3 -m twine upload dist/*

lint:
  stage: test
  before_script:
    - pip install black flake8 isort flake8-bugbear flake8-builtins flake8-comprehensions flake8-tidy-imports flake8-eradicate flake8-print flake8-return flake8-use-fstring git+https://github.com/derrix060/flake8-expression-complexity.git
  script:
    - black --check src/
    - flake8 src/
    - isort -c src/