-
Notifications
You must be signed in to change notification settings - Fork 2
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
Continuous Integration #2
Open
jedateach
wants to merge
4
commits into
ReCreateJS:master
Choose a base branch
from
jedateach:continuous-integration
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+71
−0
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -0,0 +1,71 @@ | ||
- Start Date: 2020-03-07 | ||
- RFC PR: https://github.com/ReCreateJS/rfcs/pull/2 | ||
- Relevant Project: All CreateJs Projects | ||
|
||
# Continuous Integration | ||
|
||
## Summary | ||
|
||
Continuously test the CreateJS source on PRs and releases. | ||
|
||
## Motivation | ||
|
||
The practice of continuous integration gives high confidence that contributed changes do not break the project. The project can be automated to improve in quality using appropriate tooling. | ||
|
||
## Detailed design | ||
|
||
Set up TravisCI script that runs all automated forms of testing. | ||
|
||
This will include: | ||
|
||
1. Cross-browser Javascript test suite | ||
2. Test coverage checking | ||
3. Static code linting tooling with ESLint | ||
4. Documentation coverage checking | ||
|
||
Every PR will build and test the project on TravisCI, providing an indication on the PR as to whether the change has broken anything. | ||
|
||
GitHub will be configured to prevent PRs being merge unless the travis build completes. | ||
|
||
### Run existing tests on multiple devices | ||
|
||
There already exists a test suite, that will be run on Chrome headless in Travis. | ||
|
||
Assuming visual regression tests only work on one browser, the remaining tests can be also run on: | ||
|
||
- Firefox Headless | ||
- Node | ||
- SauceLabs (lowest supported browser) | ||
|
||
### Test coverage | ||
|
||
Using Istanbul, source code will be instrumented and run to record which lines have been run by tests. | ||
|
||
The coverage report will be sent to Code Climate for analysis. | ||
|
||
If test coverage drops, or a change isn't covered by tests, then code climate will reject a PR. | ||
|
||
### Highlighting CI/CD status | ||
|
||
Add a badge to the main README.md file, showing the master build status. This should always be green, otherwise additional PRs should not be merged until it is fixed. | ||
|
||
## How we teach this | ||
|
||
Update the GitHub CONTRIBUTING.md and ISSUE_TEMPLATE.md files to explain how continuous integration works. | ||
|
||
## Drawbacks | ||
|
||
If users are unfamiliar with writing tests, then they may be less inclined to contribute. | ||
That is not to stop a PR having tests written by someone else. | ||
|
||
## Alternatives | ||
|
||
Manual testing changes is possible, but requires people's time, which is better spent in other ways. | ||
|
||
Other similar frameworks like PIXI.js are using these practices. | ||
|
||
## Unresolved questions | ||
|
||
- Use Code Climate, codecov.io, coveralls or other for coverage analysis? | ||
- Use Saucelabs or something else to do further cross-device testing? | ||
- Are there any other tools that can help? |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't state which ESLint rules to apply, or how they would be applied.
To make this work easier to digest+decide, I'll this out to it's own RFC....and probably the documentation coverage checking it also.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint rules might be tricky so I think it's a good idea to make a separate RFC. I ran the combined build against the rules I use and a lot of things came up, such as extensive use of '==' instead of '==='.
I think the temptation would be to just adjust the rules so that the current build passes.