Skip to content

Commit

Permalink
apply recommendations to use parameters in config
Browse files Browse the repository at this point in the history
  • Loading branch information
erwinmombay committed Feb 25, 2021
1 parent 1ee93ce commit 9bf1029
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 21 deletions.
31 changes: 13 additions & 18 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,26 +139,21 @@ jobs:
name: 'Validator Tests'
command: node build-system/pr-check/validator-tests.js
- fail_fast
'Nomodule Visual Diff Tests':
'Visual Diff Tests':
executor:
name: amphtml-large-executor
steps:
- setup_vm
- install_chrome
- run:
name: 'Nomodule Visual Diff Tests'
command: node build-system/pr-check/visual-diff-tests.js
- fail_fast
'Module Visual Diff Tests':
executor:
name: amphtml-large-executor
steps:
- setup_vm
- install_chrome
- run:
name: 'Module Visual Diff Tests'
command: node build-system/pr-check/visual-diff-tests.js --esm
name: 'Visual Diff Tests (using << parameters.build_type >> build)'
command: node build-system/pr-check/visual-diff-tests.js --type << parameters.build_type >>
- fail_fast
parameters:
build_type:
description: 'Which build type to use'
type: string
enum: ['module', 'nomodule']
'Unit Tests':
executor:
name: amphtml-large-executor
Expand Down Expand Up @@ -323,14 +318,14 @@ workflows:
- 'Module Build'
- 'Validator Tests':
<<: *push_and_pr_builds
- 'Nomodule Visual Diff Tests':
- 'Visual Diff Tests':
name: 'Visual Diff Tests (<< matrix.build_type >>)'
matrix:
parameters:
build_type: ['module', 'nomodule']
<<: *push_and_pr_builds
requires:
- 'Nomodule Build'
- 'Module Visual Diff Tests':
<<: *push_and_pr_builds
requires:
- 'Module Build'
- 'Unit Tests':
<<: *push_and_pr_builds
- 'Unminified Tests':
Expand Down
2 changes: 1 addition & 1 deletion build-system/pr-check/visual-diff-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const {runCiJob} = require('./ci-job');

const jobName = 'visual-diff-tests.js';

const esmFlag = argv.esm ? ' --esm' : '';
const esmFlag = argv.type === 'module' ? ' --esm' : '';

function pushBuildWorkflow() {
downloadNomoduleOutput();
Expand Down
2 changes: 1 addition & 1 deletion build-system/tasks/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ async function restartServer(serverOptions = {}) {
}
}
resetServerFiles();
startServer({}, connectOptions);
startServer({}, serverOptions);
}

/**
Expand Down
3 changes: 2 additions & 1 deletion build-system/tasks/visual-diff/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,9 @@ async function launchPercyAgent() {
async function launchWebServer() {
await startServer(
{host: HOST, port: PORT},
// eslint-disable-next-line google-camelcase/google-camelcase
{quiet: !argv.webserver_debug, new_server: argv.esm},
{compiled: true, esm: argv.esm},
{compiled: true, esm: argv.esm}
);
}

Expand Down

0 comments on commit 9bf1029

Please sign in to comment.