diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 0cf96283a..000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,69 +0,0 @@ -# -# This file is part of Plinth. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -# CircleCI 2.0 configuration file for Plinth - -version: 2 -jobs: - build: - docker: - # specify the version you desire here - # use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers` - - image: debian:unstable - - working_directory: ~/Plinth - - steps: - - checkout - - - run: - name: install plinth dependencies - command: | - export DEBIAN_FRONTEND=noninteractive - apt-get update - - # Dependencies of the plinth Debian package - apt-get build-dep -y . - - # Build dependencies - apt-get install -y build-essential - - # Test dependencies - apt-get install -y sshpass parted - - # Module dependencies - cd ~/Plinth - apt-get install -y $(./run --list-dependencies) - - - run: - name: run Debian build - # FIXME: enable testing after flagging integration tests - command: DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -us -uc -b - - - run: - name: run integration tests - command: | - adduser tester --gecos "First Last,RoomNumber,WorkPhone,HomePhone" --disabled-password - echo "tester:password" | chpasswd - cp -r ~/Plinth /home/tester - chown -R tester:tester /home/tester/Plinth - su -c "cd ~/Plinth; ./setup.py test" tester - - # We'll generate test reports once Pytest is integrated - # - store_artifacts: - # path: test-reports - # destination: test-reports diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..ddecc963c --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,34 @@ +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-get install -y $(./run --list-dependencies) # Module dependencies + +stages: + - test + - package + +run-unit-tests: + stage: test + 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; python3 setup.py test" tester + +build-debian-package: + stage: package + script: + - DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -us -uc -b + - mkdir debian-package + - mv ../plinth*.deb debian-package + + artifacts: + paths: + - debian-package/*