FreedomBox/.gitlab-ci.yml
Sunil Mohan Adapa 4dda9ad6b9
networks: Use privileged decorator for actions
Tests:

- Initial setup of during first setup works
  - When there are no wired network interfaces
  - When there is 1 wired network interface
    - When there is one wifi interface. wired network is setup as 'external'
      WAN. (simulated with edit of _get_interfaces())
    - When there are no wifi interfaces. wired network is setup as 'internal'
      WAN.
  - When there are multiple wired network interfaces
    - First one is setup as WAN rest as shared
  - When there is one wifi interface, interface is setup as shared.
  - When there are no wifi interfaces

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-08 18:52:35 -04:00

154 lines
3.4 KiB
YAML

# SPDX-License-Identifier: AGPL-3.0-or-later
include:
- remote: https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
- local: /.ci/functional-tests.yml
image: registry.salsa.debian.org/freedombox-team/freedombox:gitlabci
stages:
- provisioning
- build
- functional-tests
- publish
- test
code-quality:
stage: test
needs: []
script:
- python3 -m flake8 container 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
app-server-stable:
variables:
LAUNCH_TEMPLATE_NAME: functional-tests-stable
INSTANCE_NAME: app-server-stable
BUILD_JOB_NAME: build-backports
extends: .app-server
run-functional-tests-stable:
needs:
- job: app-server-stable
artifacts: true
extends: .run-functional-tests
terminate-app-server-stable:
needs:
- job: run-functional-tests-stable
artifacts: true
extends: .terminate-app-server
app-server-testing:
variables:
LAUNCH_TEMPLATE_NAME: functional-tests-testing
INSTANCE_NAME: app-server-testing
BUILD_JOB_NAME: build
extends: .app-server
run-functional-tests-testing:
needs:
- job: app-server-testing
artifacts: true
extends: .run-functional-tests
terminate-app-server-testing:
needs:
- job: run-functional-tests-testing
artifacts: true
extends: .terminate-app-server
app-server-unstable:
variables:
LAUNCH_TEMPLATE_NAME: functional-tests-unstable
INSTANCE_NAME: app-server-unstable
BUILD_JOB_NAME: build
extends: .app-server
run-functional-tests-unstable:
needs:
- job: app-server-unstable
artifacts: true
extends: .run-functional-tests
terminate-app-server-unstable:
needs:
- job: run-functional-tests-unstable
artifacts: true
extends: .terminate-app-server
extract-source:
extends: .provisioning-extract-source
build:
extends: .build-package
build-backports:
extends: .build-package
variables:
RELEASE: bullseye-backports
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