From: Hans-Christoph Steiner Date: Wed, 6 Dec 2017 16:51:12 +0000 (+0100) Subject: gitlab-ci: move sdist test run to new fedora job X-Git-Tag: 1.0.0~43^2 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=05abbfbabdd3bf089207cfa8b4f7bfdf70fa1095;p=fdroidserver.git 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. --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3460f092..2b337572 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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" diff --git a/tests/complete-ci-tests b/tests/complete-ci-tests index 37e59489..4573fcd5 100755 --- a/tests/complete-ci-tests +++ b/tests/complete-ci-tests @@ -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