forked from salt-formulas/reclass
-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
117 lines (109 loc) · 2.46 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
sudo: required
language: python
dist: trusty
cache: pip
python:
- '2.7'
- '3.6'
service:
- docker
#apt:
#update: true
#stages:
#- name: test
#- name: coverage
#- name: models
#- name: build
# if: fork = false
#- name: publish
# if: tag =~ ^v.* and fork = false and branch = 'master'
env:
global:
- PACKAGENAME="reclass"
install: &pyinst
- pip install -r requirements.txt
#- pip install pyparsing
#- pip install PyYAML
# To test example models with kitchen:
- |
test -e Gemfile || cat <<EOF > Gemfile
source 'https://rubygems.org'
gem 'rake'
gem 'test-kitchen'
gem 'kitchen-docker'
gem 'kitchen-inspec'
gem 'inspec'
- bundle install
script:
- python setup.py install
- find . reclass -name 'test_*.py' | sort | xargs -n1 -i% bash -c "echo %; python %"
# To test example models with kitchen:
- export PYTHON_VERSION=$TRAVIS_PYTHON_VERSION
- kitchen list
- kitchen test
# NOTE: travis stage builds, below saved for future reference
#jobs:
# include:
# - stage: test
# script: &unittest
# - python setup.py install
# - find . reclass -name 'test_*.py' | sort | xargs -n1 -i% bash -c "echo %; python %"
#
# - stage: coverage
# install: *pyinst
# script:
# - python3 -m pytest --cov=. --cov-report=term-missing:skip-covered
# - coverage xml
# #- coveralls
# #- |
# #[ ! -z "${CODACY_PROJECT_TOKEN}" ] && python-codacy-coverage -r coverage.xml || echo "Codacy coverage NOT exported"
#
# - stage: lint
# script:
# - python3 -m flake8
#
# - stage: models
# install: &kitchen
# - pip install PyYAML
# - pip install virtualenv
# - |
# test -e Gemfile || cat <<EOF > Gemfile
# source 'https://rubygems.org'
# gem 'rake'
# gem 'test-kitchen'
# gem 'kitchen-docker'
# gem 'kitchen-inspec'
# gem 'inspec'
# - bundle install
# script:
# - export PYTHON_VERSION=$TRAVIS_PYTHON_VERSION
# - kitchen list
# #FIXME- kitchen test
#
# - stage: build
# install: *pyinst
# script: []
#
# - stage: publish
# install:
# - "/bin/true"
# script:
# - "/bin/true"
# deploy:
# provider: pypi
# user: epcim
# password:
# secure: TBD
# on:
# tags: true
# repo: salt-formulas/reclass
# branch: master
# #FIXME, $TRAVIS_PYTHON_VERSION == '2.7'
notifications:
webhooks:
on_success: change # options: [always|never|change] default: always
on_failure: never
on_start: never
on_cancel: never
on_error: never
email: true