- source venv/bin/activate
- pip install pytest-cov
- py.test -q --cov=musicpd test.py
- only:
- - pushes
+ rules:
+ - changes:
+ - musicpd.py
+ - test.py
+ - if: $MUSICPD_TEST
test-py3.11:
extends:
build:
stage: build
+ extends:
+ - .cache_python
script:
+ - python -m venv venv
+ - source venv/bin/activate
+ - pip install build
# packaging test
- - python setup.py bdist_wheel sdist
+ - python3 -m build -s -w
- pip install dist/*.whl
- pip install twine
- twine check dist/*
- dist/*.whl
- dist/*.tar.gz
- dist/*.zip
- only:
- - pushes
+ rules:
+ - if: $CI_PIPELINE_SOURCE == "push"
tag_release:
stage: build
+ extends:
+ - .cache_python
script:
- - python setup.py bdist_wheel sdist
+ - python -m venv venv
+ - source venv/bin/activate
+ - pip install build
+ - python3 -m build -s -w
artifacts:
paths:
- dist/*.whl
- dist/*.tar.gz
- dist/*.zip
name: "$CI_PROJECT_NAME-$CI_COMMIT_TAG"
- only:
- - tags
+ rules:
+ - if: $CI_COMMIT_TAG
pages:
stage: build
artifacts:
paths:
- public
- only:
- - master
+ rules:
+ - if: $CI_COMMIT_BRANCH == "master"