forked from apprenticelearner/AL_Core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
163 lines (147 loc) · 3.37 KB
/
.travis.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
language: python
python:
- "3.7"
install:
- pip install .
before_script:
- pip install -r test-requirements.txt
- coverage run -m pytest
script:
- pytest
after_success:
- coveralls
# image: "python:3.7"
# variables:
# PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
# cache:
# paths:
# - .cache/pip
# stages:
# - lint
# - test
# - document
# - deploy
# flake8:
# stage: lint
# allow_failure: true
# script:
# - pip install flake8 flake8-junit-report
# - retval=0
# - flake8 --output-file flake8.txt apprentice/ || retval=$?
# - flake8_junit flake8.txt flake8_junit.xml
# - cat flake8.txt
# - exit "$retval"
# artifacts:
# when: always
# reports:
# junit: flake8_junit.xml
# tags:
# - base
# coverage:
# stage: test
# allow_failure: true
# script:
# - pip install -r requirements.txt --exists-action w
# - pip install -r test-requirements.txt
# - retval=0
# - coverage run --source apprentice -m pytest || retval=$?
# - coverage html -d coverage
# - coverage report
# - exit "$retval"
# coverage: '/\d+\%\s*$/'
# artifacts:
# paths:
# - coverage
# tags:
# - base
# pytest:
# stage: test
# allow_failure: false
# script:
# - pip install -r requirements.txt --exists-action w
# - pip install -r test-requirements.txt
# - python -m pytest
# artifacts:
# when: always
# reports:
# junit: output.xml
# tags:
# - base
# sphinx:
# stage: document
# dependencies:
# - pytest
# script:
# - pip install -r requirements.txt --exists-action w
# - pip install -r docs/doc-requirements.txt
# - apt-get update
# - apt-get install make
# - cd docs
# - make html
# - mv _build/html/ ../sphinx
# artifacts:
# paths:
# - sphinx
# tags:
# - base
# only:
# - master
# publish:
# stage: deploy
# dependencies:
# - sphinx
# script:
# - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
# - eval $(ssh-agent -s)
# - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
# - mkdir -p ~/.ssh
# - chmod 700 ~/.ssh
# - git config user.email "chris.maclellan@soartech.com"
# - git config user.name "Chris MacLellan (automated triskele)"
# - git remote rm public
# - git remote add public git@github.com:apprenticelearner/AL_Core.git
# - ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
# - git push public HEAD:soartech-dev
# tags:
# - base
# only:
# - master
# pages:
# stage: deploy
# dependencies:
# - sphinx
# - coverage
# script:
# - mv sphinx public/
# - mv coverage public/coverage
# environment:
# name: pages
# url: https://hq-git.soartech.com/apprentice/apprentice
# artifacts:
# paths:
# - public
# tags:
# - base
# only:
# - master
# dockerize:
# stage: deploy
# script:
# - docker build -t hq-git.soartech.com:4567/apprentice/apprentice .
# - docker push hq-git.soartech.com:4567/apprentice/apprentice
# tags:
# - shell
# only:
# - master
# pypi:
# stage: deploy
# dependencies:
# - pytest
# script:
# - pip install twine
# - python setup.py sdist bdist_wheel
# - twine upload --repository-url https://nexus.soartech.com:8443/nexus/repository/pypi-internal/ dist/*
# tags:
# - base
# only:
# - master