A simple, copylefted, lightweight library to work with command-line arguments in Python
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

75 lines
1.5 KiB

stages:
- test
- build
on_setup:
image: curlimages/curl:7.77.0
stage: .pre
variables:
INSTANCE: "https://codeberg.org"
MAIN_REPO: twann/python-argumentor
STATE: pending
MESSAGE: "Tests are running"
only:
- main
- tags
script:
- ./scripts/gitlab-ci.sh
test:
image: alpine:latest
stage: test
only:
- main
- tags
before_script:
- apk add python3 py3-pip py3-virtualenv
- python3 -m virtualenv venv
- venv/bin/python3 -m pip install nose==1.3.7 bandit flake8
script:
- venv/bin/nosetests --verbose test
- venv/bin/python3 -m bandit --recursive --verbose argumentor test
- venv/bin/python3 -m flake8 .
build:
image: alpine:latest
stage: build
only:
- main
- tags
before_script:
- apk add python3 py3-pip py3-setuptools py3-wheel
script:
- python3 setup.py build
- python3 setup.py sdist
- python3 setup.py bdist_wheel
on_success:
image: curlimages/curl:7.77.0
stage: .post
only:
- main
- tags
variables:
INSTANCE: "https://codeberg.org"
MAIN_REPO: twann/python-argumentor
STATE: success
MESSAGE: "Tests passed successfully"
script:
- ./scripts/gitlab-ci.sh
when: on_success
on_failure:
image: curlimages/curl:7.77.0
stage: .post
only:
- main
- tags
variables:
INSTANCE: "https://codeberg.org"
MAIN_REPO: twann/python-argumentor
STATE: failure
MESSAGE: "Tests failed"
script:
- ./scripts/gitlab-ci.sh
when: on_failure