Verified Commit 8a7eb0f2 authored by Joseph Nuthalapati's avatar Joseph Nuthalapati Committed by Sunil Mohan Adapa

ci: Replace CircleCI configuration with GitLab CI configuration

Signed-off-by: Joseph Nuthalapati's avatarJoseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa's avatarSunil Mohan Adapa <sunil@medhas.org>
parent de45c399
#
# 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 <http://www.gnu.org/licenses/>.
#
# 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
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/*
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment