forked from neelkamath/spacy-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
57 lines (48 loc) · 1.39 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
# See https://forum.gitlab.com/t/docker-dind-stops-working-after-12-1-0-update/28664/4.
services:
- name: docker:dind
entrypoint: ['env', '-u', 'DOCKER_HOST']
command: ['dockerd-entrypoint.sh']
variables:
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: '' # See https://github.com/docker-library/docker/pull/166.
stages: [download, test, build, deploy]
download-vectors:
stage: download
script:
- wget -q https://github.com/explosion/sense2vec/releases/download/v1.0.0/s2v_reddit_2015_md.tar.gz
- tar -xzf s2v_reddit_2015_md.tar.gz -C src
- rm s2v_reddit_2015_md.tar.gz
artifacts:
paths: [src/s2v_old]
test-server:
stage: test
image: docker/compose
script: docker-compose --project-directory . -f docker/docker-compose.yml -f docker/docker-compose.test.yml
run app sh -c '. scripts/setup.sh && pytest'
test-spec:
stage: test
image: node
script: npx @stoplight/spectral lint docs/spec/openapi.yaml
build-docs:
stage: build
image: node
script: npx redoc-cli bundle docs/spec/openapi.yaml --title 'spaCy Server'
artifacts:
paths: [redoc-static.html]
only: [master]
docker-hub:
stage: deploy
image: docker:dind
script: sh scripts/deploy.sh
timeout: 2h
only: [master]
pages:
stage: deploy
script:
- mkdir public
- cp redoc-static.html public/index.html
artifacts:
paths: [public]
only: [master]