Trying to mitigate installation of packages anew for gitlab ci pipelines

This commit is contained in:
Frisk 2021-05-22 21:59:47 +02:00
parent 6e985be8be
commit f8e69c7fa7
No known key found for this signature in database
GPG key ID: 213F7C15068AF8AC

View file

@ -3,6 +3,9 @@ image: python:3.7-alpine
include:
- template: Code-Quality.gitlab-ci.yml
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
stages:
- test
- pytest
@ -10,11 +13,16 @@ stages:
cache:
paths:
- settings.json
- .cache/pip
- venv/
test:
stage: test
script:
- apk add libxml2-dev libxslt-dev libxml2 gcc musl-dev linux-headers
- pip3.7 install virtualenv
- virtualenv venv
- source venv/bin/activate
- pip3.7 install -r requirements.txt
- sed -i -e "s/111111111111111111/$DISCORD1/g" settings.json.example
- sed -i -e "s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/$DISCORD2/g" settings.json.example
@ -27,6 +35,7 @@ pytest:
stage: pytest
needs: ['test']
script:
- source venv/bin/activate
- pip3.7 install -U pytest
- pytest --junitxml=report.xml
artifacts: