mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
ci: Replace CircleCI configuration with GitLab CI configuration
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
de45c39979
commit
8a7eb0f274
@ -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 <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
|
||||
34
.gitlab-ci.yml
Normal file
34
.gitlab-ci.yml
Normal file
@ -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/*
|
||||
Loading…
x
Reference in New Issue
Block a user