Merge branch 'gitlab-ci-update' into 'master'

ci: improved ci pipeline; added 3.6 to 3.11 tests

See merge request augustin_s/grum!6
This commit is contained in:
2023-03-14 20:26:39 +00:00
3 changed files with 48 additions and 17 deletions

View File

@ -1,29 +1,60 @@
stages:
- Test
- Tests
- OptionalTests
.install-grum-test: &install-grum-test
- pip install pytest pytest-random-order pytest-cov
- pip install -e ./
- apt-get update
- apt-get install -y ffmpeg libnss3 libxcomposite1 libxtst6
tests:
stage: Test
stage: Tests
image: python:3.8
variables:
QT_QPA_PLATFORM: "offscreen"
XDG_RUNTIME_DIR: "/tmp/runtime-root"
script:
- pip install pytest pytest-random-order pytest-cov
- pip install -e ./
- pip install PyQtWebEngine
- apt-get update
- apt-get install -y ffmpeg libnss3 libxcomposite1 libxtst6
# - python -m unittest discover -f ./tests
# - coverage run --source=./grum -m unittest discover -f ./tests
- coverage run --source=./grum -m pytest ./tests
- *install-grum-test
- coverage run --source=./grum -m pytest ./tests --junitxml=report-junit.xml
- coverage report
- coverage xml
coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
artifacts:
when: always
reports:
cobertura: coverage.xml
junit: report-junit.xml
tests-3.6:
stage: OptionalTests
image: python:3.6
needs: ["tests"]
allow_failure: true
variables:
QT_QPA_PLATFORM: "offscreen"
XDG_RUNTIME_DIR: "/tmp/runtime-root"
script:
- *install-grum-test
- pytest ./tests
tests-3.7:
extends: "tests-3.6"
image: python:3.7
#tests-3.8:
# extends: "tests-3.6"
# image: python:3.8
tests-3.9:
extends: "tests-3.6"
image: python:3.9
tests-3.10:
extends: "tests-3.6"
image: python:3.10
tests-3.11:
extends: "tests-3.6"
image: python:3.11

View File

@ -16,7 +16,7 @@ classifiers =
package_dir =
= .
packages = find:
python_requires = >=3.8
python_requires = >=3.6
[options.packages.find]
where = .

View File

@ -2,7 +2,7 @@ from setuptools import setup
if __name__ == "__main__":
setup(
install_requires=["pyqt5", "pyqtgraph", "h5py"],
install_requires=["pyqt5", "pyqtgraph", "h5py", "PyQtWebEngine"],
entry_points={"console_scripts": ["grum=grum:main"]},
)