-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
52 lines (50 loc) · 1.16 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
---
language: python
env:
global:
- PYPI_TEST=https://test.pypi.org/legacy/
- PYPI_PROD=https://upload.pypi.org/legacy/
- AWS_ACCESS_KEY_ID=ASIAXXX # Need dummy values for VCR tests to work
- AWS_SECRET_ACCESS_KEY=xxxxxx
cache:
- pip
branches:
only:
- master
- dev
python:
- 3.6
- 3.7
- 3.8
install:
- pip install -r requirements.txt
- pip install -r test_requirements.txt
script:
- echo ${AWS_ACCESS_KEY_ID}
- echo ${AWS_SECRET_ACCESS_KEY}
- echo -e "Testing TLX"
- flake8 --ignore=E501
- pip install . # Install package
- pytest
- bash tests/basic_cli_tests.sh
before_deploy:
- ci/set_pypi_version.sh
- |
if [ $TRAVIS_BRANCH == 'master' ];
then export PYPI_SERVER=$PYPI_PROD;
else export PYPI_SERVER=$PYPI_TEST;
fi
deploy:
provider: pypi
skip_cleanup: true
server: $PYPI_SERVER
user: $PYPI_USERNAME
password: $PYPI_PASSWORD
on: # yamllint disable-line rule:truthy
branch:
- dev
- master
python: 3.6
distributions: "sdist bdist_wheel"
# Testing Locally
#docker run --security-opt label:disable -v$(pwd):/tlx_mount -w=/tlx_mount -it --entrypoint sh python:3.6-alpine3.11