forked from IBM/detect-secrets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
42 lines (41 loc) · 1.56 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
language: python
git:
depth: false
services:
- docker
addons:
ssh_known_hosts: github.ibm.com
deploy:
- provider: script
script: >-
set -e; make docker-build-images docker-test-images setup-trivy docker-quality-images deploy
on:
all_branches: true
# only build docker image and push once
condition: $TOXENV = py38
# only deploy when pushing to gh repo
repo: IBM/detect-secrets
matrix:
include:
# - env: TOXENV=py35
# python: 3.5
- env: TOXENV=py36
python: 3.6.10 # We're targeting a specific patch version; if set to 3.6, the GitHub Travis build will use Python 3.6.7 and will fail due to a cryptography installation error
- env: TOXENV=py37
python: 3.7.11
dist: xenial # Required for Python >= 3.7 (travis-ci/travis-ci#9069), the GitHub Travis build will use Python 3.7.1 by default if you provide 3.7 without a patch version and the build will fail with AttributeError: 'str' object has no attribute 'name'
- env: TOXENV=py38
python: 3.8
dist: xenial # Required for Python >= 3.7 (travis-ci/travis-ci#9069)
# - env: TOXENV=pypy
# python: pypy
before_install:
- echo -e "machine github.com\n login $GH_ACCESS_TOKEN" >> ~/.netrc # Login to GitHub
- echo -e "machine github.ibm.com\n login $GHE_ACCESS_TOKEN" >> ~/.netrc # Login to GitHub Enterprise
install:
- pip install tox
script: make test
cache:
directories:
- $HOME/.cache/pre-commit
- $HOME/.cache/trivy