From 2fce22e63b00624d6528ff193de95dc01d1b493f Mon Sep 17 00:00:00 2001 From: Jeremy Shipman Date: Thu, 12 Mar 2020 16:58:22 +1300 Subject: [PATCH 1/4] Created continuous integration RFC --- text/0000-continous-integration.md | 71 ++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 text/0000-continous-integration.md diff --git a/text/0000-continous-integration.md b/text/0000-continous-integration.md new file mode 100644 index 0000000..db83278 --- /dev/null +++ b/text/0000-continous-integration.md @@ -0,0 +1,71 @@ +- Start Date: 2020-03-07 +- RFC PR: +- 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? From 3744cb0b94f91753ace3fb53cf1835a96518ae04 Mon Sep 17 00:00:00 2001 From: Jeremy Shipman Date: Thu, 12 Mar 2020 17:02:32 +1300 Subject: [PATCH 2/4] Updating PR with PR number --- text/0000-continous-integration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/text/0000-continous-integration.md b/text/0000-continous-integration.md index db83278..0cac850 100644 --- a/text/0000-continous-integration.md +++ b/text/0000-continous-integration.md @@ -1,5 +1,5 @@ - Start Date: 2020-03-07 -- RFC PR: +- RFC PR: #2 - Relevant Project: All CreateJs Projects # Continuous Integration From bc7e1d7989c760f7873f4c153cb4aff70d84c45a Mon Sep 17 00:00:00 2001 From: Jeremy Shipman Date: Thu, 12 Mar 2020 20:32:28 +1300 Subject: [PATCH 3/4] Rename 0000-continous-integration.md to 0002-continous-integration.md --- ...000-continous-integration.md => 0002-continous-integration.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename text/{0000-continous-integration.md => 0002-continous-integration.md} (100%) diff --git a/text/0000-continous-integration.md b/text/0002-continous-integration.md similarity index 100% rename from text/0000-continous-integration.md rename to text/0002-continous-integration.md From 8865f0884c927009b54c3bcd5be2b6897be02c1c Mon Sep 17 00:00:00 2001 From: Jeremy Shipman Date: Thu, 12 Mar 2020 20:33:58 +1300 Subject: [PATCH 4/4] Update 0002-continous-integration.md --- text/0002-continous-integration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/text/0002-continous-integration.md b/text/0002-continous-integration.md index 0cac850..2c0f598 100644 --- a/text/0002-continous-integration.md +++ b/text/0002-continous-integration.md @@ -1,5 +1,5 @@ - Start Date: 2020-03-07 -- RFC PR: #2 +- RFC PR: https://github.com/ReCreateJS/rfcs/pull/2 - Relevant Project: All CreateJs Projects # Continuous Integration