Skip to content

Commit 98a739c

Browse files
committed
Set up CI and Danger integration
1 parent d233d3f commit 98a739c

File tree

6 files changed

+29
-3
lines changed

6 files changed

+29
-3
lines changed

.style.yapf

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[style]
2+
COLUMN_LIMIT = 119
3+
INDENT_WIDTH = 4
4+
USE_TABS = False

.travis.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
language: python
2+
sudo: false
3+
dist: trusty
4+
os: linux
5+
ruby: 2.2.0
6+
cache:
7+
- pip
8+
- bundler
9+
before_script:
10+
- bundle install
11+
script:
12+
- bundle exec danger
13+
- python hello_world.py

Dangerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ if git.commits.any? { |c| c.message =~ /^Merge branch '#{github.branch_for_base}
1818
fail('Please rebase to get rid of the merge commits in this PR')
1919
end
2020

21-
code_style_validation.check validator: ['yapf'],
22-
file_extensions: ['.py']
21+
code_style_validation.check validator: 'yapf',
22+
file_extensions: ['.py']

Gemfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
GIT
22
remote: https://github.com/robertodr/danger-code_style_validation.git
3-
revision: c5041a93b0e29957f6a26167164fcd320c88cf8b
3+
revision: 8d7e49bcfc640a5c36c24f1f1d53114f42a7aa18
44
branch: yapf
55
specs:
66
danger-code_style_validation (0.1.0)

hello_world.py

+7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1+
def vector(dim):
2+
import numpy as np
3+
4+
5+
return np.random.rand(dim)
6+
17
def message():
28
return 'Hello, Danger world!'
39

410
def main():
511
print(message())
12+
print(vector(10))
613

714
if __name__ == '__main__':
815
main()

requirements.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
yapf
2+
futures

0 commit comments

Comments
 (0)