File: .gitlab-ci.yml

package info (click to toggle)
plinth 19.1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 28,292 kB
  • sloc: python: 22,057; xml: 12,007; sh: 568; pascal: 74; makefile: 49; php: 11
file content (41 lines) | stat: -rw-r--r-- 1,317 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
image: debian:unstable

before_script:
  - export DEBIAN_FRONTEND=noninteractive
  - apt-get update
  - apt-get build-dep -y .  # Dependencies of the plinth Debian package
  - apt-get install -y build-essential  # Build dependencies
  - apt-get install -y sshpass parted  # Test dependencies
  - apt-get install -y sudo
  - apt-mark hold fuse fuse3  # not installable in CI environment
  - apt-get install -y $(./run --list-dependencies)  # Module dependencies

stages:
  - test
  - package

run-unit-tests:
  stage: test
  script:
    - apt-get install -y python3-coverage libjs-jquery libjs-jquery-isonscreen libjs-jquery-tablesorter libjs-jquery-throttle-debounce
    - 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; python3 setup.py test_coverage" tester
    - cp -r /home/tester/plinth/plinth/tests/coverage/report test-coverage-report

  artifacts:
    paths:
      - test-coverage-report/*

build-debian-package:
  stage: package
  script:
    - DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -us -uc -b
    - mkdir debian-package
    - mv ../freedombox*.deb debian-package

  artifacts:
    paths:
      - debian-package/*