-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated documentation, made more variables environment variables.
- Loading branch information
travis-ci
committed
Apr 7, 2018
1 parent
155f5bd
commit 650899e
Showing
3 changed files
with
60 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,51 @@ This module hacks around the problem of running a Travis-CI job and wanting to n | |
This is a start on solving [Handle Ant's JUnit XML formatted output from test/spec runs](https://github.com/travis-ci/travis-ci/issues/239). | ||
|
||
|
||
1. To update an issue from Travis-ci, get a GitHub token | ||
1. On [GitHub](https://github.com), under your account on the upper right, click on Settings -> Developer Settings -> Personal access tokens -> [Generate new token](https://github.com/settings/tokens) | ||
2. The new token should have `public_repo` status | ||
3. On [Travis-ci](https://travis-ci.org), on your project page, click on More options -> Settings, then add the token from the step above as `GITHUB_TOKEN` | ||
4. For testing purposes, set the GITHUB_TOKEN environment variable on your local machine | ||
2. Create an issue in your GitHub repo that will be the issue that gets updated with the test results, for example `junit-results` | ||
|
||
3. In your environment, set the JUNIT_LABEL variable to the name of the label. | ||
``` | ||
export JUNIT_LABEL=junit-results | ||
``` | ||
|
||
4. Update the variables in `scripts/config.js` | ||
|
||
5. To test: | ||
``` | ||
node ./scripts/junit-results.js | ||
``` | ||
|
||
6. To actually upload the results to an issue: | ||
``` | ||
export JUNIT_RESULTS_NOT_DRY_RUN=false | ||
node junit-results.js | ||
``` | ||
|
||
7. To have Travis do the update, create a script: | ||
``` | ||
#!/bin/bash | ||
mkdir node_modules | ||
npm install @icyphy/github-issue-junit | ||
export JUNIT_LABEL=junit-results | ||
export JUNIT_RESULTS_NOT_DRY_RUN=false | ||
export GITHUB_ISSUE_JUNIT=https://api.github.com/repos/cxbrooks/travis-junit | ||
(cd node_modules/@icyphy/github-issue-junit/scripts; node junit-results.js) | ||
``` | ||
|
||
# How to publish updates to this module | ||
|
||
1. Update the patch number in package.json | ||
2. Login to npm | ||
npm login | ||
|
||
Username: icyphy-npm | ||
Password: See https://wiki.eecs.berkeley.edu/ptolemy/Ptolemy/Accounts | ||
Email: [email protected] | ||
3. Publish: | ||
npm publish --access public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters