From 2528070184b97f4d7e5e42eea5d3bbef01297bde Mon Sep 17 00:00:00 2001 From: Stephen Johnston Date: Tue, 1 Dec 2020 18:25:55 -0500 Subject: [PATCH 1/6] add review-start gulp command --- gulpfile.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gulpfile.js b/gulpfile.js index 879e34ae588..2af2661a6e4 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -383,4 +383,7 @@ gulp.task('e2e-test', gulp.series(clean, setupE2e, gulp.parallel('build-bundle-p gulp.task(bundleToStdout); gulp.task('bundle', gulpBundle.bind(null, false)); // used for just concatenating pre-built files with no build step +// build task for reviewers, runs test-coverage, serves, without watching +gulp.task('review-start', gulp.series(clean, lint, gulp.parallel('build-bundle-dev', watch, testCoverage))); + module.exports = nodeBundle; From ecf1fa29230405e73a8c94276833103926bc7c90 Mon Sep 17 00:00:00 2001 From: Stephen Johnston Date: Tue, 1 Dec 2020 18:28:22 -0500 Subject: [PATCH 2/6] remove watch, unecessary for reviews --- gulpfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index 2af2661a6e4..ab1c068a888 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -384,6 +384,6 @@ gulp.task(bundleToStdout); gulp.task('bundle', gulpBundle.bind(null, false)); // used for just concatenating pre-built files with no build step // build task for reviewers, runs test-coverage, serves, without watching -gulp.task('review-start', gulp.series(clean, lint, gulp.parallel('build-bundle-dev', watch, testCoverage))); +gulp.task('review-start', gulp.series(clean, lint, gulp.parallel('build-bundle-dev', testCoverage))); module.exports = nodeBundle; From 36c2ba05bf8ad1883a34eea12bff5b6ac11282d5 Mon Sep 17 00:00:00 2001 From: Stephen Johnston Date: Tue, 1 Dec 2020 18:39:34 -0500 Subject: [PATCH 3/6] add instructions to reviewer file for new command --- PR_REVIEW.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/PR_REVIEW.md b/PR_REVIEW.md index f991a0254f5..faf4eafd36d 100644 --- a/PR_REVIEW.md +++ b/PR_REVIEW.md @@ -5,6 +5,16 @@ If the PR is for a standard bid adapter or a standard analytics adapter, just th For modules and core platform updates, the initial reviewer should request an additional team member to review as a sanity check. Merge should only happen when the PR has 2 `LGTM` from the core team and a documentation PR if required. +### Running Tests and Verifying Integrations + +General gulp commands include separate commands for serving the codebase on a built in webserver, creating code coverage reports and allowing serving integration examples. The `review-start` gulp command combinese those into one command. + +- Run `gulp review-start` adding the host parameter `gulp review-start --host=0.0.0.0` will bind to all IPs on the machine +- Navigate to `http://host-ip:9999` +- Navigate to build/coverage/lcov-report/index.html to view coverage +- Navigate to integrationExamples/gpt/hellow_world.html for basic integration testing +- The hello_world.html and other exampls can be edited and used as needed to verify functionality + ### General PR review Process - All required global and bidder-adapter rules defined in the [Module Rules](https://docs.prebid.org/dev-docs/module-rules.html) must be followed. Please review these rules often - we depend on reviewers to enforce them. - Checkout the branch (these instructions are available on the github PR page as well). From 15453ae9c1dc6cbc4c219990fe861e20017e05c7 Mon Sep 17 00:00:00 2001 From: Stephen Johnston Date: Wed, 2 Dec 2020 14:57:07 -0500 Subject: [PATCH 4/6] Updates to add back watch --- PR_REVIEW.md | 2 +- gulpfile.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PR_REVIEW.md b/PR_REVIEW.md index faf4eafd36d..6656d7cd89e 100644 --- a/PR_REVIEW.md +++ b/PR_REVIEW.md @@ -9,7 +9,7 @@ For modules and core platform updates, the initial reviewer should request an ad General gulp commands include separate commands for serving the codebase on a built in webserver, creating code coverage reports and allowing serving integration examples. The `review-start` gulp command combinese those into one command. -- Run `gulp review-start` adding the host parameter `gulp review-start --host=0.0.0.0` will bind to all IPs on the machine +- Run `gulp review-start`, adding the host parameter `gulp review-start --host=0.0.0.0` will bind to all IPs on the machine - Navigate to `http://host-ip:9999` - Navigate to build/coverage/lcov-report/index.html to view coverage - Navigate to integrationExamples/gpt/hellow_world.html for basic integration testing diff --git a/gulpfile.js b/gulpfile.js index ab1c068a888..2af2661a6e4 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -384,6 +384,6 @@ gulp.task(bundleToStdout); gulp.task('bundle', gulpBundle.bind(null, false)); // used for just concatenating pre-built files with no build step // build task for reviewers, runs test-coverage, serves, without watching -gulp.task('review-start', gulp.series(clean, lint, gulp.parallel('build-bundle-dev', testCoverage))); +gulp.task('review-start', gulp.series(clean, lint, gulp.parallel('build-bundle-dev', watch, testCoverage))); module.exports = nodeBundle; From 546982183cb16362d85ecede6713d8c6b31fea3e Mon Sep 17 00:00:00 2001 From: Stephen Johnston Date: Wed, 9 Dec 2020 12:10:49 -0500 Subject: [PATCH 5/6] updates to had reviewer hub page --- gulpfile.js | 19 +++++++++- integrationExamples/reviewerTools/index.html | 40 ++++++++++++++++++++ 2 files changed, 57 insertions(+), 2 deletions(-) create mode 100755 integrationExamples/reviewerTools/index.html diff --git a/gulpfile.js b/gulpfile.js index 2af2661a6e4..b7a9e442a8c 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -86,7 +86,8 @@ function viewCoverage(done) { connect.server({ port: coveragePort, root: 'build/coverage/lcov-report', - livereload: false + livereload: false, + debug: true }); opens('http://' + mylocalhost + ':' + coveragePort); done(); @@ -94,6 +95,19 @@ function viewCoverage(done) { viewCoverage.displayName = 'view-coverage'; +// View the reviewer tools page +function viewReview(done) { + var mylocalhost = (argv.host) ? argv.host : 'localhost'; + var reviewUrl = 'http://' + mylocalhost + ':' + port + '/integrationExamples/reviewerTools/index.html'; // reuse the main port from 9999 + + // console.log(`stdout: opening` + reviewUrl); + + opens(reviewUrl); + done(); +}; + +viewReview.displayName = 'view-review'; + // Watch Task with Live Reload function watch(done) { var mainWatcher = gulp.watch([ @@ -384,6 +398,7 @@ gulp.task(bundleToStdout); gulp.task('bundle', gulpBundle.bind(null, false)); // used for just concatenating pre-built files with no build step // build task for reviewers, runs test-coverage, serves, without watching -gulp.task('review-start', gulp.series(clean, lint, gulp.parallel('build-bundle-dev', watch, testCoverage))); +gulp.task(viewReview); +gulp.task('review-start', gulp.series(clean, lint, gulp.parallel('build-bundle-dev', watch, testCoverage), viewReview)); module.exports = nodeBundle; diff --git a/integrationExamples/reviewerTools/index.html b/integrationExamples/reviewerTools/index.html new file mode 100755 index 00000000000..2732cb4fd88 --- /dev/null +++ b/integrationExamples/reviewerTools/index.html @@ -0,0 +1,40 @@ + + + + + + + Prebid Reviewer Tools + + + + +
+
+
+

Reviewer Tools

+

Below are links to the most common tool used by Prebid reviewers. For more info on PR review processes check out the General PR Review Process page on Github.

+

Common

+ +

Other Tools

+ +

Documentation & Training Material

+ +
+
+
+ + \ No newline at end of file From 3cb18de18f8e81b2b056b8a45a88a8bcbe011b96 Mon Sep 17 00:00:00 2001 From: Stephen Johnston Date: Fri, 11 Dec 2020 12:40:19 -0500 Subject: [PATCH 6/6] Update PR_REVIEW.md --- PR_REVIEW.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/PR_REVIEW.md b/PR_REVIEW.md index 6656d7cd89e..93525485cfa 100644 --- a/PR_REVIEW.md +++ b/PR_REVIEW.md @@ -10,10 +10,11 @@ For modules and core platform updates, the initial reviewer should request an ad General gulp commands include separate commands for serving the codebase on a built in webserver, creating code coverage reports and allowing serving integration examples. The `review-start` gulp command combinese those into one command. - Run `gulp review-start`, adding the host parameter `gulp review-start --host=0.0.0.0` will bind to all IPs on the machine -- Navigate to `http://host-ip:9999` -- Navigate to build/coverage/lcov-report/index.html to view coverage -- Navigate to integrationExamples/gpt/hellow_world.html for basic integration testing -- The hello_world.html and other exampls can be edited and used as needed to verify functionality + - A page will open which provides a hub for common reviewer tools. + - If you need to manually acceess the tools: + - Navigate to build/coverage/lcov-report/index.html to view coverage + - Navigate to integrationExamples/gpt/hellow_world.html for basic integration testing + - The hello_world.html and other exampls can be edited and used as needed to verify functionality ### General PR review Process - All required global and bidder-adapter rules defined in the [Module Rules](https://docs.prebid.org/dev-docs/module-rules.html) must be followed. Please review these rules often - we depend on reviewers to enforce them.