mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 14:32:28 +03:00
gitlab-ci: fix tests using updates from master
This commit is contained in:
parent
5dddb29bc7
commit
8e8b87e0b4
1 changed files with 17 additions and 10 deletions
|
@ -5,14 +5,20 @@ variables:
|
|||
GIT_DEPTH: 1
|
||||
|
||||
|
||||
test:
|
||||
# Run the whole test suite in an environment that is like the buildserver guest VM.
|
||||
ci-images-base run-tests:
|
||||
image: registry.gitlab.com/fdroid/ci-images-base
|
||||
script:
|
||||
- $pip install -e .[test]
|
||||
# the `fdroid build` test in tests/run-tests needs android-23
|
||||
- echo y | $ANDROID_HOME/tools/bin/sdkmanager "platforms;android-23" > /dev/null
|
||||
- cd tests
|
||||
- ./complete-ci-tests
|
||||
- $pip install -e .
|
||||
- ./tests/run-tests
|
||||
# make sure that translations do not cause stacktraces
|
||||
- cd $CI_PROJECT_DIR/locale
|
||||
- for locale in *; do
|
||||
test -d $locale || continue;
|
||||
for cmd in `sed -n 's/.*("\(.*\)", *_.*/\1/p' $CI_PROJECT_DIR/fdroid`; do
|
||||
LANGUAGE=$locale $CI_PROJECT_DIR/fdroid $cmd --help > /dev/null;
|
||||
done
|
||||
done
|
||||
|
||||
# Test that the parsing of the .yml metadata format didn't change from last
|
||||
# released version. This uses the commit ID of the release tags,
|
||||
|
@ -144,20 +150,20 @@ arch_pip_install:
|
|||
- fdroid update --help
|
||||
|
||||
lint_format_safety_bandit_checks:
|
||||
image: alpine:3.10 # cannot upgrade until bandit supports Python 3.8
|
||||
image: alpine:3.13
|
||||
variables:
|
||||
LANG: C.UTF-8
|
||||
script:
|
||||
- apk add --no-cache bash build-base dash ca-certificates gcc python3 python3-dev
|
||||
- python3 -m ensurepip
|
||||
- $pip install Babel 'bandit<1.6.0' pycodestyle pyflakes pylint safety
|
||||
- $pip install Babel bandit pycodestyle pyflakes pylint safety
|
||||
- export EXITVALUE=0
|
||||
- function set_error() { export EXITVALUE=1; printf "\x1b[31mERROR `history|tail -2|head -1|cut -b 6-500`\x1b[0m\n"; }
|
||||
- ./hooks/pre-commit || set_error
|
||||
- ./tests/test-gradlew-fdroid || set_error
|
||||
- bandit
|
||||
-ii
|
||||
-s B110,B322,B404,B408,B410,B603,B607
|
||||
-s B110,B404,B408,B410,B603,B607
|
||||
-r $CI_PROJECT_DIR fdroid
|
||||
|| set_error
|
||||
- safety check --full-report || set_error
|
||||
|
@ -321,7 +327,8 @@ plugin_fetchsrclibs:
|
|||
- fdroid | grep fetchsrclibs
|
||||
|
||||
- mkdir fdroiddata
|
||||
- curl https://gitlab.com/fdroid/fdroiddata/repository/b9e9a077d720c86ff6fff4dbb341254cc4370b1a/archive.tar.gz
|
||||
- commitid=b9e9a077d720c86ff6fff4dbb341254cc4370b1a
|
||||
- curl https://gitlab.com/fdroid/fdroiddata/-/archive/${commitid}/fdroiddata-${commitid}.tar.gz
|
||||
| tar -xz --directory=fdroiddata --strip-components=1
|
||||
- cd fdroiddata
|
||||
- fdroid fetchsrclibs freemap.opentrail:9 --verbose
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue