forked from opencybersecurityalliance/stix-shifter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
26 lines (22 loc) · 903 Bytes
/
.travis.yml
File metadata and controls
26 lines (22 loc) · 903 Bytes
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
sudo: false
language: python
os:
- linux
python:
- "3.6"
before_script:
- pip install -r requirements-dev.txt
- pip install flake8
# stop the build if there are Python syntax errors or undefined names
- flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
addons:
sonarcloud:
token:
secure: "${SONAR_CLOUD_TOKEN}"
script:
- echo "Running tests..."
- pytest --cov=stix_shifter --cov-report=xml
# - if [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ "$TRAVIS_PULL_REQUEST_SLUG" != "" ]; then sonar-scanner; fi # sonar scan on internal PRs
- if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_REPO_SLUG" == "ibm/stix-shifter" ]; then sonar-scanner; fi # sonar scan on non-PRs