-
Notifications
You must be signed in to change notification settings - Fork 424
/
.travis.yml
102 lines (90 loc) · 2.73 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
os: linux
dist: bionic
language: python
services:
- mongodb
before_install:
- sudo apt-get install -y xmlsec1
install:
- pip install tox
- pip install tox-travis
script:
- tox
jobs:
allow_failures:
- python: 3.10-dev
- python: pypy3
include:
- python: 3.6
- python: 3.7
- python: 3.8
- python: 3.9
- python: 3.10-dev
- python: pypy3
- stage: Expose env-var information
script: |
cat <<EOF
TRAVIS_BUILD_ID: $TRAVIS_BUILD_ID
TRAVIS_BUILD_STAGE_NAME: $TRAVIS_BUILD_STAGE_NAME
TRAVIS_BUILD_NUMBER: $TRAVIS_BUILD_NUMBER
TRAVIS_BUILD_WEB_URL: $TRAVIS_BUILD_WEB_URL
TRAVIS_JOB_ID: $TRAVIS_JOB_ID
TRAVIS_JOB_NAME: $TRAVIS_JOB_NAME
TRAVIS_JOB_NUMBER: $TRAVIS_JOB_NUMBER
TRAVIS_JOB_WEB_URL: $TRAVIS_JOB_WEB_URL
TRAVIS_DIST: $TRAVIS_DIST
TRAVIS_OS_NAME: $TRAVIS_OS_NAME
TRAVIS_CPU_ARCH: $TRAVIS_CPU_ARCH
TRAVIS_PYTHON_VERSION: $TRAVIS_PYTHON_VERSION
TRAVIS_SECURE_ENV_VARS: $TRAVIS_SECURE_ENV_VARS
TRAVIS_EVENT_TYPE: $TRAVIS_EVENT_TYPE
TRAVIS_REPO_SLUG: $TRAVIS_REPO_SLUG
TRAVIS_BRANCH: $TRAVIS_BRANCH
TRAVIS_COMMIT: $TRAVIS_COMMIT
TRAVIS_COMMIT_RANGE: $TRAVIS_COMMIT_RANGE
TRAVIS_TAG: $TRAVIS_TAG
TRAVIS_PULL_REQUEST: $TRAVIS_PULL_REQUEST
TRAVIS_PULL_REQUEST_BRANCH: $TRAVIS_PULL_REQUEST_BRANCH
TRAVIS_PULL_REQUEST_SHA: $TRAVIS_PULL_REQUEST_SHA
TRAVIS_PULL_REQUEST_SLUG: $TRAVIS_PULL_REQUEST_SLUG
EOF
- stage: Deploy new pre-release on PyPI
if: type = push
before_install: skip
install: skip
script:
- read -r CURRENT_VERSION <VERSION
- printf -- '%s-%s\n' "${CURRENT_VERSION}" "${TRAVIS_BUILD_NUMBER}" >VERSION
deploy:
- provider: pypi
distributions: sdist bdist_wheel
server: "https://test.pypi.org/legacy/"
skip_cleanup: true
username: "__token__"
password: "$PYPI_PRE_RELEASE_TOKEN"
on:
repo: IdentityPython/pysaml2
- stage: Deploy new release on PyPI
if: type = push AND tag IS present
before_install: skip
install: skip
script: skip
deploy:
- provider: pypi
distributions: sdist bdist_wheel
username: "__token__"
password: "$PYPI_RELEASE_TOKEN"
on:
repo: IdentityPython/pysaml2
tags: true
- stage: Deploy new release on GitHub
if: type = push AND tag IS present
before_install: skip
install: skip
script: skip
deploy:
- provider: releases
token: "$GITHUB_RELEASE_TOKEN"
on:
repo: IdentityPython/pysaml2
tags: true