Skip to content

Commit a2454a5

Browse files
authored
Add Gulp Review-Start Task (#6067)
* add review-start gulp command * remove watch, unecessary for reviews * add instructions to reviewer file for new command * Updates to add back watch * updates to had reviewer hub page * Update PR_REVIEW.md
1 parent 42be508 commit a2454a5

File tree

3 files changed

+70
-1
lines changed

3 files changed

+70
-1
lines changed

PR_REVIEW.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ If the PR is for a standard bid adapter or a standard analytics adapter, just th
55

66
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.
77

8+
### Running Tests and Verifying Integrations
9+
10+
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.
11+
12+
- Run `gulp review-start`, adding the host parameter `gulp review-start --host=0.0.0.0` will bind to all IPs on the machine
13+
- A page will open which provides a hub for common reviewer tools.
14+
- If you need to manually acceess the tools:
15+
- Navigate to build/coverage/lcov-report/index.html to view coverage
16+
- Navigate to integrationExamples/gpt/hellow_world.html for basic integration testing
17+
- The hello_world.html and other exampls can be edited and used as needed to verify functionality
18+
819
### General PR review Process
920
- 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.
1021
- Checkout the branch (these instructions are available on the github PR page as well).

gulpfile.js

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,28 @@ function viewCoverage(done) {
8686
connect.server({
8787
port: coveragePort,
8888
root: 'build/coverage/lcov-report',
89-
livereload: false
89+
livereload: false,
90+
debug: true
9091
});
9192
opens('http://' + mylocalhost + ':' + coveragePort);
9293
done();
9394
};
9495

9596
viewCoverage.displayName = 'view-coverage';
9697

98+
// View the reviewer tools page
99+
function viewReview(done) {
100+
var mylocalhost = (argv.host) ? argv.host : 'localhost';
101+
var reviewUrl = 'http://' + mylocalhost + ':' + port + '/integrationExamples/reviewerTools/index.html'; // reuse the main port from 9999
102+
103+
// console.log(`stdout: opening` + reviewUrl);
104+
105+
opens(reviewUrl);
106+
done();
107+
};
108+
109+
viewReview.displayName = 'view-review';
110+
97111
// Watch Task with Live Reload
98112
function watch(done) {
99113
var mainWatcher = gulp.watch([
@@ -383,4 +397,8 @@ gulp.task('e2e-test', gulp.series(clean, setupE2e, gulp.parallel('build-bundle-p
383397
gulp.task(bundleToStdout);
384398
gulp.task('bundle', gulpBundle.bind(null, false)); // used for just concatenating pre-built files with no build step
385399

400+
// build task for reviewers, runs test-coverage, serves, without watching
401+
gulp.task(viewReview);
402+
gulp.task('review-start', gulp.series(clean, lint, gulp.parallel('build-bundle-dev', watch, testCoverage), viewReview));
403+
386404
module.exports = nodeBundle;
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<html lang="en">
2+
<head>
3+
<!--
4+
This page provides links to common reviewer tools, tips and tricks.
5+
-->
6+
<meta charset="utf-8">
7+
<meta name="viewport" content="width=device-width, initial-scale=1">
8+
9+
<title>Prebid Reviewer Tools</title>
10+
<style>
11+
.section{padding-top:40px;}
12+
.container{max-width:600px;margin:0 auto;}
13+
</style>
14+
</head>
15+
16+
<body>
17+
<div class="section">
18+
<div class="container">
19+
<div class="row">
20+
<h1>Reviewer Tools</h1>
21+
<p>Below are links to the most common tool used by Prebid reviewers. For more info on PR review processes check out the <a href="https://github.com/prebid/Prebid.js/blob/master/PR_REVIEW.md">General PR Review Process</a> page on Github.</p>
22+
<h2>Common</h2>
23+
<ul>
24+
<li><a href="/build/coverage/lcov-report">Code Coverage</a></li>
25+
<li><a href="/integrationExamples/gpt/hello_world.html">Hello World</a></li>
26+
</ul>
27+
<h2>Other Tools</h2>
28+
<ul>
29+
<li><a href="/integrationExamples/">Other Integration Examples</a></li>
30+
</ul>
31+
<h2>Documentation & Training Material</h2>
32+
<ul>
33+
<li><a href="https://github.com/prebid/Prebid.js/blob/master/PR_REVIEW.md">General PR Review Process</a></li>
34+
<li><a href="https://youtu.be/aNCJ_Ct6Q8Y">Reviewer Video</a></li>
35+
</ul>
36+
</div>
37+
</div>
38+
</div>
39+
</body>
40+
</html>

0 commit comments

Comments
 (0)