Skip to content

Commit

Permalink
Bump default chrome docker version
Browse files Browse the repository at this point in the history
  • Loading branch information
oblador committed Nov 2, 2023
1 parent 3ab5f6d commit d98e8a2
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 1,545 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: Tests

on:
push:
branches:
- master
pull_request:
branches:
- master
Expand All @@ -23,9 +21,9 @@ jobs:
- name: Install dependencies
run: yarn --frozen-lockfile --non-interactive --silent --ignore-scripts
- name: Prepare docker
run: docker pull yukinying/chrome-headless-browser-stable:100.0.4896.127
run: docker pull yukinying/chrome-headless-browser-stable:118.0.5993.117
- name: Run unit tests
run: yarn test-ci
run: DEBUG=loki:* yarn test-ci

static-analysis:
name: Static analysis
Expand Down
4 changes: 2 additions & 2 deletions docs/command-line-arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ yarn loki test -- --port 9009
| **`--chromeAwsLambdaFunctionName`** | Name of the use to capture screenshots. | `loki` |
| **`--chromeAwsLambdaRetries`** | The number of retries for invoking the lambda, in case of failure. | `0` |
| **`--chromeConcurrency`** | How many stories to test in parallel when using chrome | `4` |
| **`--chromeDockerImage`** | What docker image to use when running chrome | `yukinying/chrome-headless-browser-stable:100.0.4896.127` |
| **`--chromeDockerWithoutSeccomp`** | Run chrome docker without custom seccomp settings. | `false` |
| **`--chromeDockerImage`** | What docker image to use when running chrome | `yukinying/chrome-headless-browser-stable:118.0.5993.117` |
| **`--chromeDockerWithoutSeccomp`** | Run chrome docker without unconfined seccomp settings. | `false` |
| **`--chromeDockerUseCopy`** | Use docker copy instead of volume mount for local stories | `false` |
| **`--chromeEnableAnimations`** | Enable CSS transitions and animations. | `false` |
| **`--chromeFlags`** | Custom chrome flags. | `--headless --disable-gpu --hide-scrollbars` |
Expand Down
2 changes: 1 addition & 1 deletion packages/runner/src/commands/test/default-options.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"chromeAwsLambdaBatchSize": "1",
"chromeAwsLambdaBatchConcurrency": "1",
"chromeConcurrency": "4",
"chromeDockerImage": "yukinying/chrome-headless-browser-stable:100.0.4896.127",
"chromeDockerImage": "yukinying/chrome-headless-browser-stable:118.0.5993.117",
"chromeFlags": "--headless --disable-gpu --hide-scrollbars",
"chromeLoadTimeout": "60000",
"chromeRetries": "0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const waitOnCDPAvailable = (host, port) =>

function createChromeDockerTarget({
baseUrl = 'http://localhost:6006',
chromeDockerImage = 'yukinying/chrome-headless-browser-stable:100.0.4896.127',
chromeDockerImage = 'yukinying/chrome-headless-browser-stable:118.0.5993.117',
chromeFlags = ['--headless', '--disable-gpu', '--hide-scrollbars'],
dockerNet = null,
dockerWithSudo = false,
Expand All @@ -62,7 +62,7 @@ function createChromeDockerTarget({
const execute = getExecutor(dockerWithSudo);

if (!chromeDockerWithoutSeccomp) {
runArgs.push(`--security-opt=seccomp=${__dirname}/docker-seccomp.json`);
runArgs.push('--security-opt=seccomp=unconfined');
}
runArgs.push('--add-host=host.docker.internal:host-gateway');

Expand Down Expand Up @@ -146,7 +146,10 @@ function createChromeDockerTarget({
const logs = execute(dockerPath, ['logs', dockerId, '--follow']);
const errorLogs = [];
logs.stderr.on('data', (chunk) => {
errorLogs.push(chunk);
console.error(chunk.toString('utf8'));

Check warning on line 149 in packages/target-chrome-docker/src/create-chrome-docker-target.js

View workflow job for this annotation

GitHub Actions / Static analysis

Unexpected console statement
});
logs.stdout.on('data', (chunk) => {
console.log(chunk.toString('utf8'));

Check warning on line 152 in packages/target-chrome-docker/src/create-chrome-docker-target.js

View workflow job for this annotation

GitHub Actions / Static analysis

Unexpected console statement
});

host = await getNetworkHost(execute, dockerId);
Expand Down
Loading

0 comments on commit d98e8a2

Please sign in to comment.