63 lines
1.2 KiB
YAML
63 lines
1.2 KiB
YAML
stages:
|
|
- 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: Tests
|
|
image: python:3.8
|
|
variables:
|
|
QT_QPA_PLATFORM: "offscreen"
|
|
XDG_RUNTIME_DIR: "/tmp/runtime-root"
|
|
PYTHONFAULTHANDLER: 1
|
|
script:
|
|
- *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"
|
|
PYTHONFAULTHANDLER: 1
|
|
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
|
|
|