openlp/.gitlab-ci.yml

106 lines
2.2 KiB
YAML

stages:
- lint
- test
- deploy
lint-python:
stage: lint
image: openlp/debian
script:
- sh scripts/generate_resources.sh
- flake8
lint-javascript:
stage: lint
image: openlp/angular
script:
- yarn install
- yarn lint
test-debian:
stage: test
image: openlp/debian
script:
- sh scripts/generate_resources.sh
- xvfb-run -s '-screen 0 1024x768x24' pytest-3 --color=no --disable-warnings --cov openlp --cov-report term
- mv .coverage linux.coverage
artifacts:
paths:
- linux.coverage
test-ubuntu:
stage: test
image: openlp/ubuntu
script:
- sh scripts/generate_resources.sh
- xvfb-run -s '-screen 0 1024x768x24' pytest-3 --color=no --disable-warnings
test-fedora:
stage: test
image: openlp/fedora
script:
- sh scripts/generate_resources.sh
- xvfb-run -s '-screen 0 1024x768x24' pytest-3 --color=no --disable-warnings
test-arch:
stage: test
image: openlp/arch
script:
- sh scripts/generate_resources.sh
- xvfb-run -s '-screen 0 1024x768x24' pytest --color=no --disable-warnings
test-macos:
stage: test
tags:
- macos
script:
- export PATH=/opt/local/bin:$PATH
- sh scripts/generate_resources.sh
- python3 -m pytest --color=no --disable-warnings --cov openlp
- mv .coverage macos.coverage
artifacts:
paths:
- macos.coverage
only:
- master@openlp/openlp
test-windows:
stage: test
tags:
- windows
script:
- C:\Users\raoul\GitLab-Runner\venv\Scripts\pytest.exe --color=no --disable-warnings --cov openlp
- mv .coverage windows.coverage
artifacts:
paths:
- windows.coverage
only:
- master@openlp/openlp
test-display:
stage: test
image: openlp/angular
script:
- yarn install
- yarn test --browsers ChromiumHeadlessCI
pages:
stage: deploy
image: openlp/debian
script:
- python3-coverage combine linux.coverage macos.coverage windows.coverage
- fixpaths .coverage
- python3-coverage html
- mv htmlcov public
- python3-coverage report
artifacts:
paths:
- public
expire_in: 30 days
dependencies:
- test-debian
- test-macos
- test-windows
only:
- master@openlp/openlp