-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
44 lines (38 loc) · 963 Bytes
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
image: python:3.7-alpine
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
stages:
- test
- pytest
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
- mv settings.json.example settings.json
- python3.7 start.py --test
only:
- testing
pytest:
stage: pytest
needs: ['test']
script:
- source venv/bin/activate
- pip3.7 install -U pytest
- PYTHONPATH=. pytest --junit-xml=report.xml
artifacts:
when: always
reports:
junit: report.xml
only:
- testing