diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..597d82f129c5ee8079df66298bf596bb772eaa8e --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,36 @@ +unittest: + image: debian:stretch + stage: test + script: + - apt update + - apt install -y python3 + - python3 -V + - uname -a + - apt install -y sqlite3 locales-all git python3-flask python3-ldap3 python3-requests python3-lxml python3-icalendar python3-mysql.connector python3-requests python3-coverage + - python3 -m coverage run tests.py + - python3 -m coverage report --include "./*" + - python3 -m coverage report -m --include "./*" > report.txt + - python3 -m coverage html --include "./*" + artifacts: + paths: + - htmlcov/* + - .coverage + - report.txt + +livetest: + image: debian:stretch + stage: test + script: + - apt update + - apt install -y python3 + - python3 -V + - uname -a + - apt install -y python3-requests +# - ./tests/urlcheck_sinf.py + +deploy_staging: + image: archlinux/base + stage: deploy + script: + - pacman --noconfirm -Sy ansible git + \ No newline at end of file diff --git a/README.md b/README.md index b8d5b45bbcb196c3adafa39fc3f0071f2beec3d3..721b0ae13f96f404b3a1a0d177ffd2e524494f2a 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ Notwendig: * sqlite * python-flask * python-requests (wird vom L2P und vom Kalenderimport verwendet, kann nicht optional eingebunden werden) +* git (zum Anzeigen der aktuellen Version) Optional (wird für einzelne Features benötigt): * python-lxml (Campus Import) diff --git a/tests/urlcheck_legacy.py b/tests/urlcheck_legacy.py index 8a663988cd779a4791def211572440d54f256370..a75547175266e5bb1f72475d49745ef8e7ba59e2 100755 --- a/tests/urlcheck_legacy.py +++ b/tests/urlcheck_legacy.py @@ -1,4 +1,4 @@ -#!/bin/env python3 +#!/usr/bin/env python3 import requests import sys diff --git a/tests/urlcheck_sinf.py b/tests/urlcheck_sinf.py index df987c1174c720dec51ac558fa63b4f7b976147f..becdbe8716c59d003b1d55a2e3bab6bac2236fbd 100755 --- a/tests/urlcheck_sinf.py +++ b/tests/urlcheck_sinf.py @@ -1,4 +1,4 @@ -#!/bin/env python3 +#!/usr/bin/env python3 import requests import sys