FreedomBox/.gitlab-ci.yml
Sunil Mohan Adapa 3c370d02ab
pyproject.toml: Merge contents of .converagerc
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-10-07 15:13:59 -04:00

88 lines
2.0 KiB
YAML

# SPDX-License-Identifier: AGPL-3.0-or-later
include: https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
image: registry.salsa.debian.org/freedombox-team/freedombox:gitlabci
stages:
- provisioning
- build
- publish
- test
code-quality:
stage: test
needs: []
script:
- python3 -m flake8 --exclude actions/domainname-change,actions/dynamicdns,actions/hostname-change,actions/networks plinth actions/*
unit-tests:
stage: test
needs: []
before_script:
- export DEBIAN_FRONTEND=noninteractive
- apt-get update
- apt-get build-dep -y . # Dependencies of the freedombox Debian package
- apt-get install -y $(./run --list-dependencies) # Module dependencies
script:
- adduser tester --gecos "First Last,RoomNumber,WorkPhone,HomePhone" --disabled-password
- echo "tester:password" | chpasswd
- cp -r . /home/tester/plinth
- chown -R tester:tester /home/tester/plinth
- su -c "cd ~/plinth;PYTHONPATH='.' py.test-3 --cov=plinth --cov-report=html:/home/tester/plinth/htmlcov --cov-report=term" tester
- cp -r /home/tester/plinth/htmlcov test-coverage-report
coverage: '/^TOTAL\s+.*\s+(\d+\.\d+%)$/'
artifacts:
paths:
- test-coverage-report/*
doc-tests:
stage: test
needs: []
script:
- doc/scripts/wikiparser.py
extract-source:
extends: .provisioning-extract-source
build:
extends: .build-package
build i386:
extends: .build-package-i386
build source:
extends: .build-source-only
test-build-any:
extends: .test-build-package-any
test-build-all:
extends: .test-build-package-all
# reprotest causes the pipeline to take too long (over 1 hour)
#reprotest:
# extends: .test-reprotest
lintian:
extends: .test-lintian
# autopkgtest is flaky due to
# https://salsa.debian.org/freedombox-team/freedombox/-/issues/2077
#autopkgtest:
# extends: .test-autopkgtest
blhc:
extends: .test-blhc
piuparts:
extends: .test-piuparts
missing-breaks:
extends: .test-missing-breaks
rc-bugs:
extends: .test-rc-bugs
aptly:
extends: .publish-aptly