forked from pallets-eco/flask-security
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
101 lines (87 loc) · 2.99 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
notifications:
email: false
language: python
dist: bionic
python:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
- pypy3
addons:
apt:
packages:
- gettext
- libenchant-dev
- aspell-ca
- aspell-en
- aspell-da
- aspell-de
- aspell-es
- aspell-eu
- aspell-fr
- aspell-nl
- aspell-pl
- aspell-pt
- aspell-ru
jobs:
allow_failures:
- python: pypy3
cache:
- apt
- pip
- directories:
- $HOME/.cache/pre-commit
services:
- postgresql
env:
- REQUIREMENTS=lowest
- REQUIREMENTS=release
before_install:
- "travis_retry pip install --upgrade pip setuptools"
- "travis_retry pip install twine wheel coveralls click==7.0.0 requirements-builder"
- "requirements-builder -e all --level=min setup.py > .travis-lowest-requirements.txt"
- "requirements-builder -e all --level=pypi setup.py > .travis-release-requirements.txt"
install:
- "pip install -r .travis-${REQUIREMENTS}-requirements.txt"
- "pip install -e .[all]"
script:
- python setup.py compile_catalog
- python setup.py test
- >
set -e;
if [[ $TRAVIS_PYTHON_VERSION == 3.7 && $REQUIREMENTS == "release" ]]; then
# Just run once - seems to have issues running on multiple environements.
pre-commit autoupdate
pre-commit run --all-files --show-diff-on-failure
# Test against a real DB (postgres)
python setup.py test --addopts --realdburl=postgresql://postgres@localhost/;
python setup.py build_sphinx compile_catalog;
echo "Running msgcheck";
msgcheck -pwW flask_security/translations/*/LC_MESSAGES/flask_security.po;
# run it again with spelling - but dont die on errors
echo "Running msgcheck with spell check (ignoring errors)";
(msgcheck -pwW -s str --pwl flask_security/translations/pwl.txt flask_security/translations/*/LC_MESSAGES/flask_security.po || exit 0);
fi
after_script:
- >
- set -e;
if [[ $TRAVIS_PYTHON_VERSION == 3.7 && $REQUIREMENTS == "release" ]]; then
coveralls;
fi
branches:
only:
- master
- /^\d+(\.\d+)*(rc\d+)*$/
deploy:
provider: pypi
username: jwag956
password:
secure: aFW/8LFbdFnwAjgPdoP09mVN+BsxeYDCAraSpBEV8aNZs7f4dyk9C3GxY2at2DEMreq8ZSaE/vRA9Zp7udo4hSYu1X2Akv8oXvlxxwJsDZJ5fNJ8N9q/rd6bKQ77x2Bp9NhQZd7b0moV2VMkUQQFQeaD6dnQG1GWR5ARbsVvnnQ4GTWiurATc8k9y+WT99ptovSYBmLX6tqqRsK0MgzEwK+5yO3wgFKwAjxG2fwOyG5Q/KC53NtBBPcoYgm4zeuksvFhMu4ztHCQRwVH5GHUacgrgXn3MGy5rlwuXLcpLu+K014ftoOZBN+26dZB3IAqwCwBDPJ56zFqjB0td90ZECwi2fXHBcXev//dmD+U+iZyQlbe+JEhervkehkHg4Fue7IhfzVQGOsDeEH6oRyY+30W2YjkRfRa3xaSLORqRHFN6JKVVVo4FvqbzhCuscKKZyGaA/1ZPDETAwpuHjLKoEMCjlKumXXpoAU+MR7sW886VpQ6j8wOi+A6G1A5fYqUdLNc/ZPeWM/Zah0pKtMMgx3mqmWUkeTP6ZViVc9h6pkqXTL6yHJa4CnOoWbWknV/yYKdXhKsYNhG7nFkqbTybJD1UI5R632dvYI4Dp2nYTWNj2cD643sX/WW6azlb0dN1LvznKzxeG18Y6DoyPCeydzPnLjZUIzB1TD/MZ11mVI=
distributions: "compile_catalog sdist bdist_wheel"
skip_cleanup: true
on:
repo: Flask-Middleware/flask-security
tags: true
python: "3.7"
condition: $REQUIREMENTS = release