From faf70675b103db435edeec19403ba946e5d7c526 Mon Sep 17 00:00:00 2001 From: Javinator9889 Date: Sun, 17 May 2020 13:58:18 +0200 Subject: [PATCH] Updated .gitlab-ci.yml - included stages --- .gitlab-ci.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d644c4f..6c37670 100755 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,15 +16,19 @@ cache: - .cache/pip - venv/ +stages: + - test + before_script: - python -V # Print out python version for debugging - apt update - - apt install -y --no-install-recommends libchromaprint-tools ffmpeg libpq-dev git postgresql + - apt install -y --no-install-recommends libchromaprint-tools ffmpeg libpq-dev git postgresql sudo - pg_ctlcluster 11 main start - - su - postgres + - sudo -u postgres -i - psql -c "CREATE DATABASE youtubemd;" - psql -c "CREATE USER $DATABASE_USER WITH ENCRYPTED PASSWORD '$DATABASE_PASSWORD';" - psql -c "GRANT ALL PRIVILEGES ON DATABASE youtubemd TO $DATABASE_USER"; + - exit - git clone https://github.com/beetbox/pyacoustid.git && cd pyacoustid - python setup.py install - cd .. && rm -rf pyacoustid/ @@ -32,10 +36,12 @@ before_script: - mkdir -p /run/user/$(id -u $(whoami)) test:pylint: + stage: test script: - pip install pylint - pylint -j 0 --exit-zero --ignored-classes=_socketobject *.py YouTubeMDBot test: + stage: test script: - python -m unittest $(pwd)/YouTubeMDBot/tests/*.py