gitlab-ci: move sdist test run to new fedora job

A full run of the test suite takes quite a bit of time.  This removes one
of the 3 runs from the main 'tests' job, and puts it into the Fedora job.
That test run is mostly to make sure the setup.py and source tarball are
correctly, so that doesn't affect merge requests very often.

This also tests `pip install --user`, which was not really being tested
before.
This commit is contained in:
Hans-Christoph Steiner 2017-12-06 17:51:12 +01:00
parent 1a77c6af38
commit 05abbfbabd
2 changed files with 10 additions and 26 deletions

View File

@ -91,12 +91,16 @@ fedora_latest:
- master@fdroid/fdroidserver
script:
- dnf -y update
- dnf -y install git gnupg java-1.8.0-openjdk-devel python3 python3-pip rsync unzip wget
- pip3 install -e .
- dnf -y install git gnupg java-1.8.0-openjdk-devel python3 python3-babel
python3-pip rsync unzip wget
- ./setup.py compile_catalog sdist
- useradd -m -c "test account" --password "fakepassword" testuser
- su testuser --login --command "cd `pwd`; pip3 install --user dist/fdroidserver-*.tar.gz"
- test -e ~testuser/.local/share/locale/de/LC_MESSAGES/fdroidserver.mo
- wget --no-verbose -O tools.zip https://dl.google.com/android/repository/tools_r25.2.4-linux.zip
- unzip -q tools.zip
- rm tools.zip
- export ANDROID_HOME=~/android-sdk
- export ANDROID_HOME=`pwd`/android-sdk
- mkdir $ANDROID_HOME
- mv tools $ANDROID_HOME/
- mkdir -p $ANDROID_HOME/licenses/
@ -107,5 +111,7 @@ fedora_latest:
- touch ~/.android/repositories.cfg
- echo y | $ANDROID_HOME/tools/bin/sdkmanager "platform-tools"
- echo y | $ANDROID_HOME/tools/bin/sdkmanager "build-tools;25.0.2"
- chown -R testuser .
- cd tests
- ./run-tests
- su testuser --login --command
"cd `pwd`; export ANDROID_HOME=$ANDROID_HOME; fdroid=~testuser/.local/bin/fdroid ./run-tests"

View File

@ -74,28 +74,6 @@ for locale in *; do
done
#------------------------------------------------------------------------------#
# test building the source tarball, then installing it
cd $WORKSPACE
python3 setup.py compile_catalog sdist
# make sure translation files got compiled and included
tar tzf dist/fdroidserver-*.tar.gz | grep locale/de/LC_MESSAGES/fdroidserver.mo
rm -rf $WORKSPACE/env
$pyvenv $WORKSPACE/env
. $WORKSPACE/env/bin/activate
# workaround https://github.com/pypa/setuptools/issues/937
pip3 install --quiet setuptools==33.1.1
pip3 install --quiet dist/fdroidserver-*.tar.gz
# make sure translation files were installed
test -e $WORKSPACE/env/share/locale/de/LC_MESSAGES/fdroidserver.mo
# run tests in new pip+pyvenv install
fdroid=$WORKSPACE/env/bin/fdroid $WORKSPACE/tests/run-tests $apksource
#------------------------------------------------------------------------------#
# test install using install direct from git repo
cd $WORKSPACE