-
-
Notifications
You must be signed in to change notification settings - Fork 24
/
.travis.yml
72 lines (63 loc) · 1.84 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
# vim: ft=yaml
language: python
addons:
apt:
packages:
- zsh
- fish
homebrew:
packages:
- bash
- zsh
- fish
- gnu-sed
- grep
update: true
jobs:
include:
- name: "Run integ tests with Python 3.9 on Linux"
os: linux
python: "3.9"
- name: "Run integ tests with Python 3.8 on Linux"
os: linux
python: "3.8"
- name: "Run integ tests with Python 3.7 on Linux"
os: linux
python: "3.7"
- name: "Run integ tests on MacOS"
os: osx
osx_image: xcode12.5
# https://docs.travis-ci.com/user/languages/python/#running-python-tests-on-multiple-operating-systems
language: shell # 'language: python' is an error on Travis CI macOS
before_install:
- python --version
- /usr/bin/env python --version
- /usr/bin/env python3 --version
- git --version
- bash --version
- /usr/bin/env bash --version
- zsh --version
- fish --version
# https://python-poetry.org/docs/#installation
- curl -sSL https://install.python-poetry.org | /usr/bin/env python3 -
- export PATH="$HOME/.local/bin:$PATH"
- export PATH="$HOME/Library/Python/3.10/bin:$PATH"
- poetry --version
install:
- make install
script:
- make lint bandit test build test-integration
# Travis does gets stuck when installing a shellcheck dependency
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make shellcheck; fi;
after_success:
- |
if [[ "$TRAVIS_PYTHON_VERSION" == "3.9" && "$TRAVIS_OS_NAME" == "linux" ]]; then
if [[ "$TRAVIS_BRANCH" != "master" ]]; then
PYPI_PASSWORD="${PYPI_TEST_PASSWORD}" make publish-test
pip3 install --index-url https://test.pypi.org/simple/ pearl==$(poetry version -s)
else
PYPI_PASSWORD="${PYPI_PROD_PASSWORD}" make publish
pip3 install pearl==$(poetry version -s)
fi;
pearl --help
fi;