Skip to content

Commit

Permalink
add a separate headed browsers task for tests that cannot be run in h…
Browse files Browse the repository at this point in the history
…eadless mode (#7530)

## Purpose
We have only one task that runs tests in headed mode(multiple-windows).
We need an additional task that can be used for tests that need to run
in headed mode.
 
## Approach
Add the additional task "headed-browsers" 

## Pre-Merge TODO
- [ ] Write tests for your proposed changes
- [ ] Make sure that existing tests do not fail
  • Loading branch information
Artem-Babich authored Feb 24, 2023
1 parent 8ef9b0a commit e574d35
Show file tree
Hide file tree
Showing 15 changed files with 218 additions and 99 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/test-client-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ on:
workflow_dispatch:
inputs:
sha:
desciption: 'The test commit SHA or ref'
description: 'The test commit SHA or ref'
required: true
default: 'master'
merged_sha:
description: 'The merge commit SHA'
description: 'The merge commit SHA'
deploy_run_id:
description: 'The ID of a deployment workspace run with artifacts'
jobs:
jobs:
test:
runs-on: ubuntu-latest
environment: test-client
env:
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
steps:
Expand All @@ -33,7 +33,7 @@ jobs:
- uses: actions/checkout@v2
with:
ref: ${{github.event.inputs.merged_sha || github.event.inputs.sha}}

- uses: actions/setup-node@v2
with:
node-version: 16
Expand All @@ -42,9 +42,9 @@ jobs:
with:
script: |
const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
let artifacts = {};
for(let i = 0;i<36&&!artifacts.total_count;i++,await delay(5000)) {
try {
({ data: artifacts } = await github.actions.listWorkflowRunArtifacts({
Expand All @@ -57,14 +57,14 @@ jobs:
console.log(e);
}
}
const { data: artifact } = await github.request(artifacts.artifacts.find(artifact=> artifact.name === 'npm').archive_download_url);
require('fs').writeFileSync(require('path').join(process.env.GITHUB_WORKSPACE, 'package.zip'), Buffer.from(artifact))
- run: |
unzip package.zip
tar --strip-components=1 -xzf testcafe-*.tgz
- name: Get npm cache directory
id: npm-cache-dir
run: |
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/test-client-mobile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ on:
workflow_dispatch:
inputs:
sha:
desciption: 'The test commit SHA or ref'
description: 'The test commit SHA or ref'
required: true
default: 'master'
merged_sha:
description: 'The merge commit SHA'
description: 'The merge commit SHA'
deploy_run_id:
description: 'The ID of a deployment workspace run with artifacts'
jobs:
jobs:
test:
runs-on: ubuntu-latest
environment: test-client
env:
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
steps:
Expand All @@ -33,7 +33,7 @@ jobs:
- uses: actions/checkout@v2
with:
ref: ${{github.event.inputs.merged_sha || github.event.inputs.sha}}

- uses: actions/setup-node@v2
with:
node-version: 16
Expand All @@ -42,9 +42,9 @@ jobs:
with:
script: |
const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
let artifacts = {};
for(let i = 0;i<36&&!artifacts.total_count;i++,await delay(5000)) {
try {
({ data: artifacts } = await github.actions.listWorkflowRunArtifacts({
Expand All @@ -57,14 +57,14 @@ jobs:
console.log(e);
}
}
const { data: artifact } = await github.request(artifacts.artifacts.find(artifact=> artifact.name === 'npm').archive_download_url);
require('fs').writeFileSync(require('path').join(process.env.GITHUB_WORKSPACE, 'package.zip'), Buffer.from(artifact))
- run: |
unzip package.zip
tar --strip-components=1 -xzf testcafe-*.tgz
- name: Get npm cache directory
id: npm-cache-dir
run: |
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/test-functional-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ on:
workflow_dispatch:
inputs:
sha:
desciption: 'The test commit SHA or ref'
description: 'The test commit SHA or ref'
required: true
default: 'master'
merged_sha:
description: 'The merge commit SHA'
description: 'The merge commit SHA'
deploy_run_id:
description: 'The ID of a deployment workspace run with artifacts'
jobs:
jobs:
test:
runs-on: ubuntu-latest
environment: test-functional
Expand All @@ -30,7 +30,7 @@ jobs:
- uses: actions/checkout@v2
with:
ref: ${{github.event.inputs.merged_sha || github.event.inputs.sha}}

- uses: actions/setup-node@v2
with:
node-version: 14
Expand All @@ -39,9 +39,9 @@ jobs:
with:
script: |
const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
let artifacts = {};
for(let i = 0;i<36&&!artifacts.total_count;i++,await delay(5000)) {
try {
({ data: artifacts } = await github.actions.listWorkflowRunArtifacts({
Expand All @@ -54,14 +54,14 @@ jobs:
console.log(e);
}
}
const { data: artifact } = await github.request(artifacts.artifacts.find(artifact=> artifact.name === 'docker').archive_download_url);
require('fs').writeFileSync(require('path').join(process.env.GITHUB_WORKSPACE, 'docker.zip'), Buffer.from(artifact))
- run: |
unzip docker.zip
docker load -i testcafe-*.tar
- name: Get npm cache directory
id: npm-cache-dir
run: |
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/test-functional-local-chrome.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ on:
workflow_dispatch:
inputs:
sha:
desciption: 'The test commit SHA or ref'
description: 'The test commit SHA or ref'
required: true
default: 'master'
merged_sha:
description: 'The merge commit SHA'
description: 'The merge commit SHA'
deploy_run_id:
description: 'The ID of a deployment workspace run with artifacts'
jobs:
jobs:
test:
runs-on: ubuntu-latest
environment: test-functional
Expand All @@ -32,7 +32,7 @@ jobs:
- uses: actions/checkout@v2
with:
ref: ${{github.event.inputs.merged_sha || github.event.inputs.sha}}

- uses: actions/setup-node@v2
with:
node-version: 16
Expand All @@ -41,9 +41,9 @@ jobs:
with:
script: |
const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
let artifacts = {};
for(let i = 0;i<36&&!artifacts.total_count;i++,await delay(5000)) {
try {
({ data: artifacts } = await github.actions.listWorkflowRunArtifacts({
Expand All @@ -56,14 +56,14 @@ jobs:
console.log(e);
}
}
const { data: artifact } = await github.request(artifacts.artifacts.find(artifact=> artifact.name === 'npm').archive_download_url);
require('fs').writeFileSync(require('path').join(process.env.GITHUB_WORKSPACE, 'package.zip'), Buffer.from(artifact))
- run: |
unzip package.zip
tar --strip-components=1 -xzf testcafe-*.tgz
- name: Get npm cache directory
id: npm-cache-dir
run: |
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/test-functional-local-esm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ on:
workflow_dispatch:
inputs:
sha:
desciption: 'The test commit SHA or ref'
description: 'The test commit SHA or ref'
required: true
default: 'master'
merged_sha:
description: 'The merge commit SHA'
description: 'The merge commit SHA'
deploy_run_id:
description: 'The ID of a deployment workspace run with artifacts'
jobs:
jobs:
test:
runs-on: ubuntu-latest
environment: test-functional
Expand All @@ -32,7 +32,7 @@ jobs:
- uses: actions/checkout@v2
with:
ref: ${{github.event.inputs.merged_sha || github.event.inputs.sha}}

- uses: actions/setup-node@v2
with:
node-version: 16
Expand All @@ -41,9 +41,9 @@ jobs:
with:
script: |
const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
let artifacts = {};
for(let i = 0;i<36&&!artifacts.total_count;i++,await delay(5000)) {
try {
({ data: artifacts } = await github.actions.listWorkflowRunArtifacts({
Expand All @@ -56,14 +56,14 @@ jobs:
console.log(e);
}
}
const { data: artifact } = await github.request(artifacts.artifacts.find(artifact=> artifact.name === 'npm').archive_download_url);
require('fs').writeFileSync(require('path').join(process.env.GITHUB_WORKSPACE, 'package.zip'), Buffer.from(artifact))
- run: |
unzip package.zip
tar --strip-components=1 -xzf testcafe-*.tgz
- name: Get npm cache directory
id: npm-cache-dir
run: |
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/test-functional-local-firefox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ on:
workflow_dispatch:
inputs:
sha:
desciption: 'The test commit SHA or ref'
description: 'The test commit SHA or ref'
required: true
default: 'master'
merged_sha:
description: 'The merge commit SHA'
description: 'The merge commit SHA'
deploy_run_id:
description: 'The ID of a deployment workspace run with artifacts'
jobs:
jobs:
test:
runs-on: ubuntu-latest
environment: test-functional
Expand All @@ -32,7 +32,7 @@ jobs:
- uses: actions/checkout@v2
with:
ref: ${{github.event.inputs.merged_sha || github.event.inputs.sha}}

- uses: actions/setup-node@v2
with:
node-version: 16
Expand All @@ -41,9 +41,9 @@ jobs:
with:
script: |
const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
let artifacts = {};
for(let i = 0;i<36&&!artifacts.total_count;i++,await delay(5000)) {
try {
({ data: artifacts } = await github.actions.listWorkflowRunArtifacts({
Expand All @@ -56,14 +56,14 @@ jobs:
console.log(e);
}
}
const { data: artifact } = await github.request(artifacts.artifacts.find(artifact=> artifact.name === 'npm').archive_download_url);
require('fs').writeFileSync(require('path').join(process.env.GITHUB_WORKSPACE, 'package.zip'), Buffer.from(artifact))
- run: |
unzip package.zip
tar --strip-components=1 -xzf testcafe-*.tgz
- name: Get npm cache directory
id: npm-cache-dir
run: |
Expand Down
Loading

0 comments on commit e574d35

Please sign in to comment.