Skip to content

Commit 1d539ab

Browse files
lgarithmDEKHTIARJonathan
authored andcommitted
[WIP] Include Danger in travis-ci (#563)
[WIP] Include Danger in travis-ci
1 parent 4db0b9f commit 1d539ab

File tree

4 files changed

+83
-3
lines changed

4 files changed

+83
-3
lines changed

.travis.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ env:
1111

1212
- PYPI_USER='jonathandekhtiar'
1313

14+
# See https://docs.travis-ci.com/user/encryption-keys/ for more details about secure keys.
15+
1416
### == PYPI_PASSWORD === ###
1517
## To update: travis encrypt PYPI_PASSWORD=################################
1618
- secure: "fGIRDjfzzP9DhdDshgh/+bWTZ5Y0jTD4aR+gsT1TyAyc6N4f3RRlx70xZZwYMdQ+XC3no/q4na8UzhhuSM0hCCM1EaQ78WF1c6+FBScf4vYGoYgyJ1am+4gu54JXt+4f0bd+s6jyYBafJALUJp5fqHoxCUXqzjrOqGBBU2+JbL71Aaj8yhQuK0VPPABexsQPQM312Gvzg7hy9dh63J0Q02PqINn+CTcwq3gLH9Oua58zWQ7TaT0cdy/hzAc6Yxy3ajo2W5NU+nKROaaG9W57sa7K/v1dshDFFFST2DdGxm9i7vvfPsq0OWM6qWLsec/4mXJWsmai2ygZEv+IhaABb10c7spd2nl7oHFj2UGmldtO5W0zLb1KkCPWDPilFt3lvHM+OS/YaibquL5/5+yGj0LsRJrVyWoMBA8idcQeH4dvTAfySeFpO42VNwW5ez9JaEOh7bBp7naAA8c/fbNJJ5YEW4MEmOZ9dwFTohNNDiN+oITSrcXBS+jukbfTOmtCeYNUker+4G2YwII9cxHXbZeIMrTq9AqTfOVTAYCFaFHKbpSc1+HCyF7n5ZfNC00kBaw93XUnLRzSNKe5Ir791momYL8HecMN3OAI77bz26/pHSfzJnLntq9qx2nLBTnqDuSq5/pHvdZ8hyt+hTDxvF7HJIVMhbnkjoLPxmn4k/I="
@@ -19,16 +21,18 @@ env:
1921
## To update: travis encrypt GITHUB_PERSONAL_TOKEN=################################
2022
- secure: "GmdokEVWFS4LlSIdhfYvET+53hcuN9gN5gbhYduWkvyqvCJnP5PENzxdDz6Y3EJCSXxfKTT+jBLmJkgOElgeWxyAEa+wGj3jJzpjFD8BEcxIf5mNsyJ2LryzecFoKjcCR7viid14GDEYSeA3UB0MgKgitm9rMmcQ2W9RLJfAmTfGRQ+kMwhM7GTeFc5c99YL7DW7AUFSbiAac/k50AMx2j9KNT1JAGhDoc5yVTdVvtKrdtuCZUa82q4Cm/h4IEd6BbNrcImYyxQ814LHCrHWBi9jmuc+UxqvsTH1ErNapIObz490ri3DmZg+LUrH5dIuhSa5HGqZjob6tKG6XCKFWOuv9E73+URDitJllXHc1qSP/K61SMmsQrE2FnaxVjxpQCOcqueRMKszwH5/k3UoGbUPWsBFwbBznXrnHO/DNHAgL9XwOFP6biPP8TKp2ReX41YwcU6sbiYb7naGWo3Dhe+yEB9wBGOwuGHipDQm9R4SSIJgjpdc642KjcEMQqb3yL7DWpOmItXMxoGNM+X93kU4u4u1tGgq1yxnhEk6VG2l/yI6A2QOVIPyOu+L9FkZL3mrl9mbUeBKr/SHX4CTFODi5io8D0lqwNSRZrmi/GGWh2glbNnTapD67UnTnsh/6LE2YiSqGteH47EByb9V4ykrjfdv5EZhyJNwI7jYPDw="
2123

24+
# DANGER_GITHUB_API_TOKEN
25+
- secure: "Gwj32xBnwb4+HsNc2vMaH3oFm4eyv/a8a0vz+R0G5KxBCZi/pKJIlkJKA2ECvKAqcEjneVJUXL426u8rhbezvcl+duQS5sm8VlZx79BDKoQ7lkKBbTllXS1wNlM9YE8OI1QdSjCTVzR9AH65bDWIdxDoKqIUKbG3iOIEe57xeMgxHyHXbUe5b1hBByszILnFJv6NB+dYVBnJp31PJ1ts+8fiGoxAOrUq7LlnG9EzfMjKEmlOHJL++igRsGIQgEUfdDyD+6uGRVcj6MxJ8gX3jMsSoiwUk6Pfp3Q7+BcHjGc3VZNjJ4u3SC/eZ5chDiwhuK+h985GFvEo/Q3fwUwFK0L40iX/J8asp8J8bfL+ygax+BkU1ivr678f5WxwB+Lwzkwmq1u/UZH3tiqZ/q1qFs4hnuxceBWh4dSmtYcxKWsVV2dRXQpoA7ap3hlRptUE3KK2NvsyOdxo4gqCGGxduwyc71z6eZKjXMCXumz6L+Wj34XEDGvA4BWmnWetpc2KywfTFm/2UshxJOXD5RWOkYOGgWojdDQ5n90l16oyVq+23bDXOtKPSQ0UDbleh0u97atDnpY08JLFudNf4W4CK+IZFsu608FwfMy0TPMFPd/kYEcz+dOTluNxO1lSUxcFItmM/05NboEsuYMnreHoFJfNNxiHMeF/kb4DuAEG2jQ="
26+
2227

2328
install:
2429
- pip install -e .[tf_cpu,db,dev,test,doc]
2530

26-
2731
script:
2832
# units test
2933
# https://docs.pytest.org/en/latest/
30-
- pytest
31-
34+
- pytest
35+
- if [ "$TRAVIS_PYTHON_VERSION" == '3.6' ] && [ "$TRAVIS_EVENT_TYPE" = "pull_request" ]; then bundle install && bundle exec danger; fi
3236

3337
before_deploy:
3438
- python setup.py sdist

CHANGELOG.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](https://keepachangelog.com/)
5+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
<!--
8+
9+
============== Guiding Principles ==============
10+
11+
* Changelogs are for humans, not machines.
12+
* There should be an entry for every single version.
13+
* The same types of changes should be grouped.
14+
* Versions and sections should be linkable.
15+
* The latest version comes first.
16+
* The release date of each version is displayed.
17+
* Mention whether you follow Semantic Versioning.
18+
19+
============== Types of changes (keep the order) ==============
20+
21+
* `Added` for new features.
22+
* `Changed` for changes in existing functionality.
23+
* `Deprecated` for soon-to-be removed features.
24+
* `Removed` for now removed features.
25+
* `Fixed` for any bug fixes.
26+
* `Security` in case of vulnerabilities.
27+
28+
============== How To Update The Changelog for a New Release ==============
29+
30+
** Always Keep The Unreleased On Top **
31+
32+
To release a new version, please update the changelog as followed:
33+
1. Rename the `Unreleased` Section to the Section Number
34+
2. Recreate an `Unreleased` Section on top
35+
3. Update the links at the very bottom
36+
-->
37+
38+
## [Unreleased]
39+
40+
## [1.8.5] - 2018-05-09
41+
42+
### Added
43+
44+
### Changed
45+
46+
### Deprecated
47+
48+
### Removed
49+
50+
### Fixed
51+
52+
### Security
53+
54+
[Unreleased]: https://github.com/olivierlacan/keep-a-changelog/compare/1.8.5...master
55+
[1.8.5]: https://github.com/tensorlayer/tensorlayer/compare/1.8.4...1.8.5

Dangerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Add a CHANGELOG entry for app changes
2+
if !git.modified_files.include?("CHANGELOG.md")
3+
fail("Please include a CHANGELOG entry. \nYou can find it at [CHANGELOG.md](https://github.com/tensorlayer/tensorlayer/blob/master/CHANGELOG.md).")
4+
message "Note, we hard-wrap at 80 chars and use 2 spaces after the last line."
5+
end
6+
7+
# Add ability to modify PR rather than just add comments
8+
# https://github.com/danger/danger/issues/825#issuecomment-303691442
9+
github.api.update_pull_request(
10+
github.pr_json.base.repo.full_name,
11+
github.pr_json.number,
12+
{:body => github.pr_body + "Some new text"}
13+
)

Gemfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# frozen_string_literal: true
2+
3+
source "https://rubygems.org"
4+
5+
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
6+
7+
gem 'danger'
8+
gem 'danger-prose'

0 commit comments

Comments
 (0)