-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitlab-ci.yml
89 lines (81 loc) · 2.33 KB
/
.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
image: yourlabs/python
build:
image: docker:dind
stage: build
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build -f Dockerfile -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA
qa:
stage: test
script: flake8 --exclude migrations,djwebdapp_example* src djwebdapp_demo
docs:
stage: test
image: $CI_REGISTRY_IMAGE:${CI_COMMIT_SHORT_SHA}
script:
- pip install sphinx -r docs/requirements.txt
- cd docs && make html SPHINXOPTS="-W --keep-going -n"
# The following job tests tezos, it's a bit complicated to debug so I'll
# document it here.
#
# Build the local test image as such:
#
# docker build -t djwebdapp .
#
# Then, change the job image to be "djwebdapp" in the following config.
#
# Finnally, you can run:
#
# gitlab-runner exec docker --docker-pull-policy=if-not-present test
#
# This will execute the same as the gitlab server but on your local
# workstation. You'll then be able to enter the containers and debug them from
# the inside.
test:
stage: test
script: py.test -sv --cov=/app/src --cov-report xml --cov-report term-missing tests
image: $CI_REGISTRY_IMAGE:${CI_COMMIT_SHORT_SHA}
variables:
POSTGRES_USER: tzkt
POSTGRES_PASSWORD: qwerty
POSTGRES_DB: tzkt_db
TZKT_API_KESTREL__ENDPOINTS__HTTP__URL: http://tzkt-api:5000
TezosNode__Endpoint: http://tzlocal:8732
ConnectionStrings__DefaultConnection: host=tzkt-db;port=5432;database=tzkt_db;username=tzkt;password=qwerty;
FF_NETWORK_PER_BUILD: "1"
artifacts:
expire_in: 2 days
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
services:
- alias: ethlocal
name: ethereum/client-go
command:
- "--dev"
- "--networkid=17"
- "--nodiscover"
- "--maxpeers=0"
- "--http"
- "--http.addr=0.0.0.0"
- "--http.corsdomain=*"
- "--http.vhosts=*"
- "--http.api=eth,net,web3,personal,miner"
- "--miner.gasprice=0"
- "--ws"
- "--ws.addr=0.0.0.0"
- "--nousb"
- "--gcmode=archive"
- alias: tzlocal
name: pyratzlabs/tezos:nairobi
- alias: tzkt-db
name: postgres:13
- alias: tzkt-api
name: bakingbad/tzkt-api:latest
- alias: tzkt-sync
name: bakingbad/tzkt-sync:latest
pypi:
stage: deploy
script: pypi-release
only: [tags]