diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2022-12-13 15:48:25 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2022-12-14 11:13:41 +0100 |
commit | 5e121edfd6b3bb4de4344e2f631630bf94c3de0b (patch) | |
tree | 389f71c606222c0b25e4ae651ebd3689a1c93a60 | |
parent | d9af1b7df9c597ee483269f50f0a4e60b1f838d4 (diff) | |
download | Ishtar-5e121edfd6b3bb4de4344e2f631630bf94c3de0b.tar.bz2 Ishtar-5e121edfd6b3bb4de4344e2f631630bf94c3de0b.zip |
Fix CI for debian package
-rw-r--r-- | .gitlab-ci.yml | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 78233b71d..5e2998c4d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,8 +6,6 @@ before_script: - dpkg-reconfigure --frontend=noninteractive locales && update-locale LANG=$LANG - pip3 install -r requirements.txt - cp Makefile.example Makefile - - sed -i -e 's/"registration"/"django_registration"/' example_project/settings.py - - cp example_project/local_settings.py.gitlab-ci example_project/local_settings.py variables: POSTGRES_DB: gis @@ -16,7 +14,10 @@ variables: build-v4: stage: "build" - script: "make build_gitlab" + script: + - sed -i -e 's/"registration"/"django_registration"/' example_project/settings.py + - cp example_project/local_settings.py.gitlab-ci example_project/local_settings.py + - make build_gitlab services: - postgis/postgis:13-3.3 tags: @@ -26,7 +27,10 @@ build-v4: test-v4: stage: "test" - script: "make test_gitlab" + script: + - sed -i -e 's/"registration"/"django_registration"/' example_project/settings.py + - cp example_project/local_settings.py.gitlab-ci example_project/local_settings.py + - make test_gitlab services: - postgis/postgis:13-3.3 tags: @@ -37,16 +41,23 @@ test-v4: debian: stage: "test" script: - - apt-get install -q -y devscripts build-essential lintian wget - - make deb - - wget -O /etc/apt/sources.list.d/iggdrasil.list http://deb.iggdrasil.net/dists/bullseye/iggdrasil.list - - wget -O - http://deb.iggdrasil.net/contact@iggdrasil.net.gpg.key | apt-key add - - apt-get update - - apt-get install -q -y --force-yes python-django-ishtar locales-all - - INSTANCE=my_ishtar URL=localhost ishtar-prepare-instance - - dpkg -i python-django-ishtar_*.deb - services: - - postgis/postgis:13-3.3 + - apt-get install -q -y devscripts build-essential lintian wget dh-python python3-all sudo findutils + - apt-get install -q -y libpq-dev python3-dev libjpeg-dev zlib1g-dev libxml2-dev libxslt1-dev libgeos-dev libtidy-dev binutils libproj-dev python3-setuptools + - apt install -q -y --force-yes locales-all + - wget -O /etc/apt/sources.list.d/iggdrasil.list http://deb.iggdrasil.net/apt/debian/dists/bullseye/iggdrasil.list + - wget -O - http://deb.iggdrasil.net/iggdrasil.gpg.key | apt-key add - + - apt-get update + - python3 -c 'import re;print(" ".join([re.search(r"(^[^(]*)", p).group(1).strip() for p in open("debian/control", "r").read().split("python3:Depends}")[1].split("Description:")[0].replace(",", "").split("\n") if p and "Recommends" not in p]))' > /tmp/packages.txt + - xargs apt-get -q -y install < /tmp/packages.txt + - cp Makefile.example Makefile + - make deb + - dpkg -i ../python3-django-ishtar_*_all.deb + - /etc/init.d/postgresql start + - INSTANCE=my_ishtar URL=localhost MAX_UPLOAD_SIZE=100 ishtar-prepare-instance + - sudo -u postgres createdb -O ishtar-my_ishtar test_ishtar-my_ishtar + - sudo -u postgres psql -d test_ishtar-my_ishtar -c 'CREATE EXTENSION postgis;' + - cd /srv/ishtar/my_ishtar && python3 ./manage.py test -k archaeological_operations ishtar_common archaeological_context_records archaeological_files archaeological_finds archaeological_warehouse tags: - bullseye only: |