Merge gitlab configuration & refactor dependencies
This commit is contained in:
parent
890d2b1158
commit
db2bb54d1d
8 changed files with 190 additions and 76 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
stages:
|
stages:
|
||||||
|
- build
|
||||||
- test
|
- test
|
||||||
- release
|
- release
|
||||||
|
|
||||||
|
|
@ -12,6 +13,43 @@ cache:
|
||||||
- .cache/pip
|
- .cache/pip
|
||||||
- .cache/poetry
|
- .cache/poetry
|
||||||
|
|
||||||
include:
|
development-build:
|
||||||
- local: '/gitlab/test.yml'
|
stage: build
|
||||||
- local: '/gitlab/release.yml'
|
image: python:3.11
|
||||||
|
script:
|
||||||
|
- make install-development
|
||||||
|
- transip-listen --help
|
||||||
|
only:
|
||||||
|
- development
|
||||||
|
|
||||||
|
production-build:
|
||||||
|
stage: build
|
||||||
|
image: python:3.11
|
||||||
|
script:
|
||||||
|
- make install-prod
|
||||||
|
- transip-listen --help
|
||||||
|
only:
|
||||||
|
- main
|
||||||
|
|
||||||
|
tests:
|
||||||
|
stage: test
|
||||||
|
coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/'
|
||||||
|
image: python:3.11
|
||||||
|
before_script:
|
||||||
|
- pip install -r requirements/ci.txt
|
||||||
|
script:
|
||||||
|
- coverage run --module unittest
|
||||||
|
- coverage report
|
||||||
|
|
||||||
|
release:
|
||||||
|
stage: release
|
||||||
|
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_TAG
|
||||||
|
script:
|
||||||
|
- echo 'running release job'
|
||||||
|
release:
|
||||||
|
name: 'Release $CI_COMMIT_TAG'
|
||||||
|
description: './CHANGELOG.md'
|
||||||
|
tag_name: '$CI_COMMIT_TAG'
|
||||||
|
ref: '$CI_COMMIT_TAG'
|
||||||
|
|
|
||||||
32
Makefile
32
Makefile
|
|
@ -4,15 +4,33 @@
|
||||||
# Build dependencies
|
# Build dependencies
|
||||||
build:
|
build:
|
||||||
pip-compile --output-file=requirements/base.txt pyproject.toml
|
pip-compile --output-file=requirements/base.txt pyproject.toml
|
||||||
pip-compile --extra=development --output-file=requirements/development.txt pyproject.toml
|
|
||||||
pip-compile --extra=development --extra=ci --output-file=requirements/ci.txt pyproject.toml
|
|
||||||
pip-compile --extra=sentry-enabled --output-file=requirements/production.txt pyproject.toml
|
|
||||||
|
|
||||||
# Install for development
|
# development
|
||||||
install-dev:
|
pip-compile \
|
||||||
|
--extra=development \
|
||||||
|
--output-file=requirements/development.txt \
|
||||||
|
requirements/base.txt \
|
||||||
|
pyproject.toml
|
||||||
|
|
||||||
|
# ci
|
||||||
|
pip-compile \
|
||||||
|
--extra=development \
|
||||||
|
--extra=ci \
|
||||||
|
--output-file=requirements/ci.txt \
|
||||||
|
requirements/development.txt \
|
||||||
|
pyproject.toml
|
||||||
|
|
||||||
|
# production
|
||||||
|
pip-compile \
|
||||||
|
--extra=sentry-enabled \
|
||||||
|
--output-file=requirements/production.txt \
|
||||||
|
requirements/base.txt \
|
||||||
|
pyproject.toml
|
||||||
|
|
||||||
|
install-development:
|
||||||
python -m pip install -r requirements/development.txt
|
python -m pip install -r requirements/development.txt
|
||||||
python -m pip install -e ".[development]"
|
python -m pip install --no-dependencies -e .
|
||||||
|
|
||||||
install-production:
|
install-production:
|
||||||
python -m pip install -r requirements/production.txt
|
python -m pip install -r requirements/production.txt
|
||||||
python -m pip install ".[sentry-enabled]"
|
python -m pip install --no-dependencies .
|
||||||
|
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
release:
|
|
||||||
stage: release
|
|
||||||
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
|
||||||
rules:
|
|
||||||
- if: $CI_COMMIT_TAG
|
|
||||||
script:
|
|
||||||
- echo 'running release job'
|
|
||||||
release:
|
|
||||||
name: 'Release $CI_COMMIT_TAG'
|
|
||||||
description: './CHANGELOG.md'
|
|
||||||
tag_name: '$CI_COMMIT_TAG'
|
|
||||||
ref: '$CI_COMMIT_TAG'
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
tests:
|
|
||||||
stage: test
|
|
||||||
coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/'
|
|
||||||
image: python:3.11
|
|
||||||
before_script:
|
|
||||||
- pip install -r requirements/ci.txt
|
|
||||||
script:
|
|
||||||
- coverage run --module unittest
|
|
||||||
- coverage report
|
|
||||||
|
|
@ -23,12 +23,12 @@ development = [
|
||||||
ci = ['coverage>=5.3.1']
|
ci = ['coverage>=5.3.1']
|
||||||
sentry-enabled = ['sentry_sdk>=0.19.5']
|
sentry-enabled = ['sentry_sdk>=0.19.5']
|
||||||
|
|
||||||
|
[tool.setuptools.packages]
|
||||||
|
find = {include = ['transip_client']}
|
||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
transip-listen = 'transip_client.cli:run'
|
transip-listen = 'transip_client.cli:run'
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ['setuptools']
|
requires = ['setuptools']
|
||||||
build-backend = 'setuptools.build_meta'
|
build-backend = 'setuptools.build_meta'
|
||||||
|
|
||||||
[tool.setuptools.packages]
|
|
||||||
find = {include = ['transip_client']}
|
|
||||||
|
|
|
||||||
|
|
@ -2,59 +2,101 @@
|
||||||
# This file is autogenerated by pip-compile with Python 3.11
|
# This file is autogenerated by pip-compile with Python 3.11
|
||||||
# by the following command:
|
# by the following command:
|
||||||
#
|
#
|
||||||
# pip-compile --extra=ci --extra=development --output-file=requirements/ci.txt pyproject.toml
|
# pip-compile --extra=ci --extra=development --output-file=requirements/ci.txt pyproject.toml requirements/development.txt
|
||||||
#
|
#
|
||||||
autoflake==2.1.1
|
autoflake==2.2.0
|
||||||
# via transip-client (pyproject.toml)
|
# via
|
||||||
|
# -r requirements/development.txt
|
||||||
|
# transip-client (pyproject.toml)
|
||||||
black==23.3.0
|
black==23.3.0
|
||||||
# via transip-client (pyproject.toml)
|
# via
|
||||||
|
# -r requirements/development.txt
|
||||||
|
# transip-client (pyproject.toml)
|
||||||
build==0.10.0
|
build==0.10.0
|
||||||
# via pip-tools
|
# via
|
||||||
|
# -r requirements/development.txt
|
||||||
|
# pip-tools
|
||||||
certifi==2023.5.7
|
certifi==2023.5.7
|
||||||
# via requests
|
# via
|
||||||
|
# -r requirements/development.txt
|
||||||
|
# requests
|
||||||
cffi==1.15.1
|
cffi==1.15.1
|
||||||
# via cryptography
|
# via
|
||||||
|
# -r requirements/development.txt
|
||||||
|
# cryptography
|
||||||
charset-normalizer==3.1.0
|
charset-normalizer==3.1.0
|
||||||
# via requests
|
# via
|
||||||
|
# -r requirements/development.txt
|
||||||
|
# requests
|
||||||
click==8.1.3
|
click==8.1.3
|
||||||
# via
|
# via
|
||||||
|
# -r requirements/development.txt
|
||||||
# black
|
# black
|
||||||
# pip-tools
|
# pip-tools
|
||||||
# transip-client (pyproject.toml)
|
# transip-client (pyproject.toml)
|
||||||
coverage==7.2.7
|
coverage==7.2.7
|
||||||
# via transip-client (pyproject.toml)
|
# via transip-client (pyproject.toml)
|
||||||
cryptography==41.0.1
|
cryptography==41.0.1
|
||||||
# via transip-client (pyproject.toml)
|
# via
|
||||||
|
# -r requirements/development.txt
|
||||||
|
# transip-client (pyproject.toml)
|
||||||
idna==3.4
|
idna==3.4
|
||||||
# via requests
|
# via
|
||||||
|
# -r requirements/development.txt
|
||||||
|
# requests
|
||||||
isort==5.12.0
|
isort==5.12.0
|
||||||
# via transip-client (pyproject.toml)
|
# via
|
||||||
|
# -r requirements/development.txt
|
||||||
|
# transip-client (pyproject.toml)
|
||||||
mypy-extensions==1.0.0
|
mypy-extensions==1.0.0
|
||||||
# via black
|
# via
|
||||||
|
# -r requirements/development.txt
|
||||||
|
# black
|
||||||
packaging==23.1
|
packaging==23.1
|
||||||
# via
|
# via
|
||||||
|
# -r requirements/development.txt
|
||||||
# black
|
# black
|
||||||
# build
|
# build
|
||||||
pathspec==0.11.1
|
pathspec==0.11.1
|
||||||
# via black
|
# via
|
||||||
|
# -r requirements/development.txt
|
||||||
|
# black
|
||||||
pip-tools==6.13.0
|
pip-tools==6.13.0
|
||||||
# via transip-client (pyproject.toml)
|
# via
|
||||||
|
# -r requirements/development.txt
|
||||||
|
# transip-client (pyproject.toml)
|
||||||
platformdirs==3.8.0
|
platformdirs==3.8.0
|
||||||
# via black
|
# via
|
||||||
|
# -r requirements/development.txt
|
||||||
|
# black
|
||||||
pycparser==2.21
|
pycparser==2.21
|
||||||
# via cffi
|
# via
|
||||||
|
# -r requirements/development.txt
|
||||||
|
# cffi
|
||||||
pyflakes==3.0.1
|
pyflakes==3.0.1
|
||||||
# via autoflake
|
# via
|
||||||
|
# -r requirements/development.txt
|
||||||
|
# autoflake
|
||||||
pyproject-hooks==1.0.0
|
pyproject-hooks==1.0.0
|
||||||
# via build
|
# via
|
||||||
|
# -r requirements/development.txt
|
||||||
|
# build
|
||||||
python-dotenv==1.0.0
|
python-dotenv==1.0.0
|
||||||
# via transip-client (pyproject.toml)
|
# via
|
||||||
|
# -r requirements/development.txt
|
||||||
|
# transip-client (pyproject.toml)
|
||||||
requests==2.31.0
|
requests==2.31.0
|
||||||
# via transip-client (pyproject.toml)
|
# via
|
||||||
|
# -r requirements/development.txt
|
||||||
|
# transip-client (pyproject.toml)
|
||||||
urllib3==2.0.3
|
urllib3==2.0.3
|
||||||
# via requests
|
# via
|
||||||
|
# -r requirements/development.txt
|
||||||
|
# requests
|
||||||
wheel==0.40.0
|
wheel==0.40.0
|
||||||
# via pip-tools
|
# via
|
||||||
|
# -r requirements/development.txt
|
||||||
|
# pip-tools
|
||||||
|
|
||||||
# The following packages are considered to be unsafe in a requirements file:
|
# The following packages are considered to be unsafe in a requirements file:
|
||||||
# pip
|
# pip
|
||||||
|
|
|
||||||
|
|
@ -2,29 +2,40 @@
|
||||||
# This file is autogenerated by pip-compile with Python 3.11
|
# This file is autogenerated by pip-compile with Python 3.11
|
||||||
# by the following command:
|
# by the following command:
|
||||||
#
|
#
|
||||||
# pip-compile --extra=development --output-file=requirements/development.txt pyproject.toml
|
# pip-compile --extra=development --output-file=requirements/development.txt pyproject.toml requirements/base.txt
|
||||||
#
|
#
|
||||||
autoflake==2.1.1
|
autoflake==2.2.0
|
||||||
# via transip-client (pyproject.toml)
|
# via transip-client (pyproject.toml)
|
||||||
black==23.3.0
|
black==23.3.0
|
||||||
# via transip-client (pyproject.toml)
|
# via transip-client (pyproject.toml)
|
||||||
build==0.10.0
|
build==0.10.0
|
||||||
# via pip-tools
|
# via pip-tools
|
||||||
certifi==2023.5.7
|
certifi==2023.5.7
|
||||||
# via requests
|
# via
|
||||||
|
# -r requirements/base.txt
|
||||||
|
# requests
|
||||||
cffi==1.15.1
|
cffi==1.15.1
|
||||||
# via cryptography
|
# via
|
||||||
|
# -r requirements/base.txt
|
||||||
|
# cryptography
|
||||||
charset-normalizer==3.1.0
|
charset-normalizer==3.1.0
|
||||||
# via requests
|
# via
|
||||||
|
# -r requirements/base.txt
|
||||||
|
# requests
|
||||||
click==8.1.3
|
click==8.1.3
|
||||||
# via
|
# via
|
||||||
|
# -r requirements/base.txt
|
||||||
# black
|
# black
|
||||||
# pip-tools
|
# pip-tools
|
||||||
# transip-client (pyproject.toml)
|
# transip-client (pyproject.toml)
|
||||||
cryptography==41.0.1
|
cryptography==41.0.1
|
||||||
# via transip-client (pyproject.toml)
|
# via
|
||||||
|
# -r requirements/base.txt
|
||||||
|
# transip-client (pyproject.toml)
|
||||||
idna==3.4
|
idna==3.4
|
||||||
# via requests
|
# via
|
||||||
|
# -r requirements/base.txt
|
||||||
|
# requests
|
||||||
isort==5.12.0
|
isort==5.12.0
|
||||||
# via transip-client (pyproject.toml)
|
# via transip-client (pyproject.toml)
|
||||||
mypy-extensions==1.0.0
|
mypy-extensions==1.0.0
|
||||||
|
|
@ -40,17 +51,25 @@ pip-tools==6.13.0
|
||||||
platformdirs==3.8.0
|
platformdirs==3.8.0
|
||||||
# via black
|
# via black
|
||||||
pycparser==2.21
|
pycparser==2.21
|
||||||
# via cffi
|
# via
|
||||||
|
# -r requirements/base.txt
|
||||||
|
# cffi
|
||||||
pyflakes==3.0.1
|
pyflakes==3.0.1
|
||||||
# via autoflake
|
# via autoflake
|
||||||
pyproject-hooks==1.0.0
|
pyproject-hooks==1.0.0
|
||||||
# via build
|
# via build
|
||||||
python-dotenv==1.0.0
|
python-dotenv==1.0.0
|
||||||
# via transip-client (pyproject.toml)
|
# via
|
||||||
|
# -r requirements/base.txt
|
||||||
|
# transip-client (pyproject.toml)
|
||||||
requests==2.31.0
|
requests==2.31.0
|
||||||
# via transip-client (pyproject.toml)
|
# via
|
||||||
|
# -r requirements/base.txt
|
||||||
|
# transip-client (pyproject.toml)
|
||||||
urllib3==2.0.3
|
urllib3==2.0.3
|
||||||
# via requests
|
# via
|
||||||
|
# -r requirements/base.txt
|
||||||
|
# requests
|
||||||
wheel==0.40.0
|
wheel==0.40.0
|
||||||
# via pip-tools
|
# via pip-tools
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,31 +2,49 @@
|
||||||
# This file is autogenerated by pip-compile with Python 3.11
|
# This file is autogenerated by pip-compile with Python 3.11
|
||||||
# by the following command:
|
# by the following command:
|
||||||
#
|
#
|
||||||
# pip-compile --extra=sentry-enabled --output-file=requirements/production.txt pyproject.toml
|
# pip-compile --extra=sentry-enabled --output-file=requirements/production.txt pyproject.toml requirements/base.txt
|
||||||
#
|
#
|
||||||
certifi==2023.5.7
|
certifi==2023.5.7
|
||||||
# via
|
# via
|
||||||
|
# -r requirements/base.txt
|
||||||
# requests
|
# requests
|
||||||
# sentry-sdk
|
# sentry-sdk
|
||||||
cffi==1.15.1
|
cffi==1.15.1
|
||||||
# via cryptography
|
# via
|
||||||
|
# -r requirements/base.txt
|
||||||
|
# cryptography
|
||||||
charset-normalizer==3.1.0
|
charset-normalizer==3.1.0
|
||||||
# via requests
|
# via
|
||||||
|
# -r requirements/base.txt
|
||||||
|
# requests
|
||||||
click==8.1.3
|
click==8.1.3
|
||||||
# via transip-client (pyproject.toml)
|
# via
|
||||||
|
# -r requirements/base.txt
|
||||||
|
# transip-client (pyproject.toml)
|
||||||
cryptography==41.0.1
|
cryptography==41.0.1
|
||||||
# via transip-client (pyproject.toml)
|
# via
|
||||||
|
# -r requirements/base.txt
|
||||||
|
# transip-client (pyproject.toml)
|
||||||
idna==3.4
|
idna==3.4
|
||||||
# via requests
|
# via
|
||||||
|
# -r requirements/base.txt
|
||||||
|
# requests
|
||||||
pycparser==2.21
|
pycparser==2.21
|
||||||
# via cffi
|
# via
|
||||||
|
# -r requirements/base.txt
|
||||||
|
# cffi
|
||||||
python-dotenv==1.0.0
|
python-dotenv==1.0.0
|
||||||
# via transip-client (pyproject.toml)
|
# via
|
||||||
|
# -r requirements/base.txt
|
||||||
|
# transip-client (pyproject.toml)
|
||||||
requests==2.31.0
|
requests==2.31.0
|
||||||
# via transip-client (pyproject.toml)
|
# via
|
||||||
|
# -r requirements/base.txt
|
||||||
|
# transip-client (pyproject.toml)
|
||||||
sentry-sdk==1.26.0
|
sentry-sdk==1.26.0
|
||||||
# via transip-client (pyproject.toml)
|
# via transip-client (pyproject.toml)
|
||||||
urllib3==2.0.3
|
urllib3==2.0.3
|
||||||
# via
|
# via
|
||||||
|
# -r requirements/base.txt
|
||||||
# requests
|
# requests
|
||||||
# sentry-sdk
|
# sentry-sdk
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue