chiark / gitweb /
yaml rewrite version code as int
[fdroidserver.git] / .gitlab-ci.yml
1 image: registry.gitlab.com/fdroid/ci-images-server:latest
2
3 test:
4   script:
5     - apt-get -qq update && apt-get -y dist-upgrade
6     - mkdir -p /usr/lib/python3.4/site-packages/
7     # workaround https://github.com/pypa/setuptools/issues/937
8     - pip3 install setuptools==33.1.1
9     - pip3 install -e .
10     - cd tests
11     - ./complete-ci-tests
12
13 # Test that the parsing of the .txt format didn't change. The metadata
14 # field 'Author Web Site' was added after 0.7.0, so that can't be part
15 # of the test.
16 metadata_v0:
17   script:
18     - cd tests
19     - cp dump_internal_metadata_format.py dump.py # since this isn't in old commits
20     - export GITCOMMIT=`git describe`
21     - git checkout 0.7.0  # or any old commit of your choosing
22     - cd ..
23     - sed -i "s/'Author Email',/'Author Email',\n'Author Web Site',/" fdroidserver/metadata.py
24     - git clone --depth 1 https://gitlab.com/fdroid/fdroiddata
25     - cd fdroiddata
26     - ../tests/dump.py
27     - cd ..
28     - git reset --hard
29     - git checkout $GITCOMMIT
30     - cd fdroiddata
31     - ../tests/dump.py
32     - "sed -i -e '/AuthorWebSite/d'
33              -e '/Description: No description available/d'
34              -e \"/Description: ''/d\"
35              -e '/buildozer:/d'
36              metadata/dump_*/*.yaml"
37     - diff -uw metadata/dump_*