Skip to content

[WIP] Include Danger in travis-ci #563

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
May 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ env:

- PYPI_USER='jonathandekhtiar'

# See https://docs.travis-ci.com/user/encryption-keys/ for more details about secure keys.

### == PYPI_PASSWORD === ###
## To update: travis encrypt PYPI_PASSWORD=################################
- 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="
Expand All @@ -19,16 +21,18 @@ env:
## To update: travis encrypt GITHUB_PERSONAL_TOKEN=################################
- secure: "GmdokEVWFS4LlSIdhfYvET+53hcuN9gN5gbhYduWkvyqvCJnP5PENzxdDz6Y3EJCSXxfKTT+jBLmJkgOElgeWxyAEa+wGj3jJzpjFD8BEcxIf5mNsyJ2LryzecFoKjcCR7viid14GDEYSeA3UB0MgKgitm9rMmcQ2W9RLJfAmTfGRQ+kMwhM7GTeFc5c99YL7DW7AUFSbiAac/k50AMx2j9KNT1JAGhDoc5yVTdVvtKrdtuCZUa82q4Cm/h4IEd6BbNrcImYyxQ814LHCrHWBi9jmuc+UxqvsTH1ErNapIObz490ri3DmZg+LUrH5dIuhSa5HGqZjob6tKG6XCKFWOuv9E73+URDitJllXHc1qSP/K61SMmsQrE2FnaxVjxpQCOcqueRMKszwH5/k3UoGbUPWsBFwbBznXrnHO/DNHAgL9XwOFP6biPP8TKp2ReX41YwcU6sbiYb7naGWo3Dhe+yEB9wBGOwuGHipDQm9R4SSIJgjpdc642KjcEMQqb3yL7DWpOmItXMxoGNM+X93kU4u4u1tGgq1yxnhEk6VG2l/yI6A2QOVIPyOu+L9FkZL3mrl9mbUeBKr/SHX4CTFODi5io8D0lqwNSRZrmi/GGWh2glbNnTapD67UnTnsh/6LE2YiSqGteH47EByb9V4ykrjfdv5EZhyJNwI7jYPDw="

# DANGER_GITHUB_API_TOKEN
- 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="


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


script:
# units test
# https://docs.pytest.org/en/latest/
- pytest

- pytest
- if [ "$TRAVIS_PYTHON_VERSION" == '3.6' ] && [ "$TRAVIS_EVENT_TYPE" = "pull_request" ]; then bundle install && bundle exec danger; fi

before_deploy:
- python setup.py sdist
Expand Down
55 changes: 55 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

<!--

============== Guiding Principles ==============

* Changelogs are for humans, not machines.
* There should be an entry for every single version.
* The same types of changes should be grouped.
* Versions and sections should be linkable.
* The latest version comes first.
* The release date of each version is displayed.
* Mention whether you follow Semantic Versioning.

============== Types of changes (keep the order) ==============

* `Added` for new features.
* `Changed` for changes in existing functionality.
* `Deprecated` for soon-to-be removed features.
* `Removed` for now removed features.
* `Fixed` for any bug fixes.
* `Security` in case of vulnerabilities.

============== How To Update The Changelog for a New Release ==============

** Always Keep The Unreleased On Top **

To release a new version, please update the changelog as followed:
1. Rename the `Unreleased` Section to the Section Number
2. Recreate an `Unreleased` Section on top
3. Update the links at the very bottom
-->

## [Unreleased]

## [1.8.5] - 2018-05-09

### Added

### Changed

### Deprecated

### Removed

### Fixed

### Security

[Unreleased]: https://github.com/olivierlacan/keep-a-changelog/compare/1.8.5...master
[1.8.5]: https://github.com/tensorlayer/tensorlayer/compare/1.8.4...1.8.5
13 changes: 13 additions & 0 deletions Dangerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Add a CHANGELOG entry for app changes
if !git.modified_files.include?("CHANGELOG.md")
fail("Please include a CHANGELOG entry. \nYou can find it at [CHANGELOG.md](https://github.com/tensorlayer/tensorlayer/blob/master/CHANGELOG.md).")
message "Note, we hard-wrap at 80 chars and use 2 spaces after the last line."
end

# Add ability to modify PR rather than just add comments
# https://github.com/danger/danger/issues/825#issuecomment-303691442
github.api.update_pull_request(
github.pr_json.base.repo.full_name,
github.pr_json.number,
{:body => github.pr_body + "Some new text"}
)
8 changes: 8 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# frozen_string_literal: true

source "https://rubygems.org"

git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }

gem 'danger'
gem 'danger-prose'