Skip to content

Commit b1f1b26

Browse files
committed
Travis: improve setup for releases
1 parent 12a8288 commit b1f1b26

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

.travis.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ jobs:
66
fast_finish: true
77
include:
88
# py37 is not available in trusty dist, and requires sudo=true with xenial.
9-
- python: 3.7
9+
- stage: test
10+
python: 3.7
1011
env: TOXENV=py37-dj21-sqlite
1112
dist: xenial
1213
sudo: true
@@ -40,8 +41,11 @@ jobs:
4041
- python: 3.6
4142
env: TOXENV=checkqa,docs SKIP_COVERAGE=1
4243

43-
- stage: PyPI Release
44-
if: tag IS present
44+
- stage: test_release
45+
python: 3.6
46+
env: TOXENV=py36-dj20-postgres
47+
48+
- stage: release
4549
script: skip
4650
install: skip
4751
after_success: true
@@ -54,9 +58,19 @@ jobs:
5458
tags: true
5559
distributions: "sdist bdist_wheel"
5660

61+
# NOTE: does not show up in "allowed failures" section, but is allowed to
62+
# fail (for the "test" stage).
5763
allow_failures:
5864
- env: TOXENV=py36-djmaster-postgres
5965

66+
stages:
67+
- name: test
68+
if: tag IS NOT present
69+
- name: test_release
70+
if: tag IS present
71+
- name: release
72+
if: tag IS present
73+
6074
install:
6175
# Create pip wrapper script, using travis_retry (a function) and
6276
# inject it into tox.ini.

0 commit comments

Comments
 (0)