forked from pydantic/pydantic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
151 lines (136 loc) · 4.57 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
os: linux
dist: xenial
sudo: required
language: python
cache: pip
python:
- '3.6'
- '3.7'
- '3.8'
install:
- make install
- pip freeze
script:
- python -c "import sys, pydantic; print('compiled:', pydantic.compiled); sys.exit(1 if pydantic.compiled else 0)"
- make test
- python3 ./changes/make_history.py
- make lint
- make mypy
- make check-dist
env:
global:
- 'CYTHON=no'
- 'DEPS=yes'
after_success:
- ls -lha
- bash <(curl -s https://codecov.io/bash) -e CYTHON,DEPS,TRAVIS_JOB_NAME
stages:
- name: test
if: type = pull_request OR branch = master OR tag IS present
- name: build
if: type = push AND (branch = master OR tag IS present)
jobs:
include:
- stage: test
python: 3.6
name: 'Cython: 3.6'
script:
- make build-cython-trace
- python -c "import sys, pydantic; print('compiled:', pydantic.compiled); sys.exit(0 if pydantic.compiled else 1)"
- make test
env:
- 'CYTHON=yes'
- stage: test
python: 3.7
name: 'Cython: 3.7'
script:
- make build-cython-trace
- python -c "import sys, pydantic; print('compiled:', pydantic.compiled); sys.exit(0 if pydantic.compiled else 1)"
- make test
env:
- 'CYTHON=yes'
- stage: test
python: 3.8
name: 'Cython: 3.8'
script:
- make build-cython-trace
- python -c "import sys, pydantic; print('compiled:', pydantic.compiled); sys.exit(0 if pydantic.compiled else 1)"
- make test
env:
- 'CYTHON=yes'
- stage: test
python: 3.6
name: 'Without Deps 3.6'
script:
- pip uninstall -y cython email-validator typing-extensions devtools
- make test
env:
- 'DEPS=no'
- stage: test
python: 3.7
name: 'Without Deps 3.7'
script:
- pip uninstall -y cython email-validator typing-extensions devtools
- make test
env:
- 'DEPS=no'
- stage: test
python: 3.8
name: 'Without Deps 3.8'
script:
- pip uninstall -y cython email-validator typing-extensions devtools
- make test
env:
- 'DEPS=no'
- stage: test
python: 3.7
name: 'Test FastAPI'
script:
- make test-fastapi
after_success: skip
- stage: test
python: 3.7
name: 'Benchmarks'
script:
- make build-cython
- BENCHMARK_REPEATS=1 make benchmark-all
after_success: skip
- stage: build
name: 'PyPI Build and Upload'
python: 3.7
services:
- docker
install: skip
env:
- 'PIP=pip'
- 'CIBW_BUILD="cp36-manylinux1_x86_64 cp36-manylinux1_i686 cp37-manylinux1_x86_64 cp37-manylinux1_i686 cp38-manylinux1_x86_64 cp38-manylinux1_i686"'
- 'CIBW_BEFORE_BUILD="pip install -U cython"'
- 'CIBW_TEST_REQUIRES=pytest'
- 'CIBW_TEST_COMMAND="pytest {project}/tests"'
script:
- ./tests/check_tag.py
- pip install -U cibuildwheel wheel
- cibuildwheel --output-dir dist
- SKIP_CYTHON=1 python setup.py sdist bdist_wheel
after_success:
- ls -lha dist
deploy:
provider: pypi
skip_cleanup: true
user: samuelcolvin
password:
secure: 'QbXFF2puEWjhFUpD0yu2R+wP4QI1IKIomBkMizsiCyMutlexERElranyYB8bsakvjPaJ+zU14ufffh2u7UA7Zhep/iE4skRHq4XWxnnRLHGu5nyGf3+zSM3F9MOzV32eZ4CDLJtFb6I0ensjTpodJH2EsIYHYxTgndIZn56Qbh6CStj7Xg1zm0Ujxdzm4ZLgcS28SOF/tpjsDW9+GXwc6L1mAZWYiS98gVgzL1vBd9tL9uFbbuFwGz9uhFMzFJko7vXSl8urWB4qeCspKXa9iKH7/AOYSwXTCwcg8U2hhC9UsOapnga2BubZKlU5HRfSs9fQcpnzcP2lwhSmkrEFa8VOw83hX6+bL564xK1Q4kanfGZ1fLU4FYge3iOnqjH7ajO7xEcUrcOEYUPfxM4EfdiDw0xnAzE1ITGH1/pZikF+wjlu+ez7RmmnejgK7quT1WU7keo7pSlRSfQtNgNl6xu818x0xZ1TScfN6e9npNy4TYyIooMOOeI4tMdfcR4JClkjGKhAtBk81DH7isZgPv3uwocGnKZ2S7La97CE3ADzU3MTA9xVIOSOjzwuvAe72uS2nwzqXkS9KATdATkC9QCvheJ9jIBB4UcqnHbD8L1gkqdmZwXZqHZldq8wcqNYZb+81lumy5EZ6xSoEzlLDpXHe80EjMUOBkb5fz3D44s='
on:
tags: true
all_branches: true
- stage: build
name: 'Docs Build and Upload'
python: 3.7
script: make docs
env:
- secure: "vpTd8bkwPBP0CV3EJBAwSMNMnNK3m/71dvTvBd1T4YGuefyJvYhtA7wauA5xRL9jpK2mu5QR5eo0owTUJhKi4DjpafMMd1bc4PnXlrdZFzkn3VsGmlKt74D/aJgiuiNyhd/Qvq4OxMHrMhf4f6lKWoMM1vh6yT0yp3+51SexSh2Me0Q+npxbjXwoxX5XUHRcoSLtFk4GbYI88a2I+08XWI6v+Awo/giQ5QurUJhjAklbosrrQVr1FCOkU0em5jeyZvEbZSLmaMtbX1JlRdKoJm6WMU+y9I7zj35w6ue/vgfcLz7b/HDZrBx7/L9g1LxRo80briueX/IbHvN7DOVFKvaXVmnEa6lIDdCeOLOyESpIbmjqmDKi8JeexdPNxKq4Tvo2VEA9dL2w2aw+aALNtU2OF5iEMfPTUQyosu/CNu2PKtiuZkSOdvpYbSy1WUNHJRvomdR4Olzg8ZIScNsxU3IIPdrlG/LUA8auXcE9juFeZfD6D2hQZATqWeEe/C2J7amNSD+mLLaTf6nMQw8oNtKYOvYK17M7xyvi7HXDy711Bi18U3x6Ye0xGx8CDbFwl0ICNzIk9rrSAh9hEHTvfdUUkk35pxifvO0Hrh4SArCA20ozcH/hHWBhyqGdxoIQ6KoDgNbIFIGQ6/vugxL/pt8z1sJwPfJnq8tRDAyWZvE="
deploy:
provider: script
script: make publish
on:
tags: true