Skip to content

Commit

Permalink
Revert "browser groups"
Browse files Browse the repository at this point in the history
This reverts commit 5371e54.
  • Loading branch information
shamilovtim committed Dec 3, 2023
1 parent 5371e54 commit b30bb0b
Show file tree
Hide file tree
Showing 10 changed files with 137 additions and 285 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/tests-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,17 @@ jobs:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

test-with-browsers:
name: test-with-browsers (${{ matrix.browser }})
name: test-with-browsers (group ${{ matrix.group }})
# Run browser tests using macOS so that WebKit tests don't fail under a Linux environment
runs-on: macos-latest
strategy:
# parallelism strategy: agent takes as long as roughly all other pkgs combined.
matrix:
browser: ['--group chromium', ' --group firefox', '--group webkit']
include:
- group: "A"
packages: "--workspace packages/agent --workspace packages/dids "
- group: "B"
packages: "--workspace packages/common --workspace packages/crypto --workspace packages/credentials --workspace packages/user-agent --workspace packages/proxy-agent --workspace packages/api --workspace packages/identity-agent"
steps:
- name: Checkout source
uses: actions/checkout@v4
Expand Down Expand Up @@ -134,16 +139,16 @@ jobs:
- name: Build esm
run: npm run build:esm --ws

- name: Build browser bundles
run: npm run build:browser --ws
- name: Build browser for matrix ${{ matrix.group }}
run: npm run build:browser ${{ matrix.packages }}

- name: Run dwn-server (background)
run: |
node node_modules/@web5/dwn-server/dist/esm/src/main.js &
echo "DWN_SERVER_BACKGROUND_PROCESS=$!" >> $GITHUB_ENV
- name: Run tests for matrix ${{ matrix.browser }}
run: npm run test:browser --ws -- ${{ matrix.browser }}
- name: Run tests for matrix ${{ matrix.group }}
run: npm run test:browser ${{ matrix.packages }}

- name: Terminate dwn-server
run: kill $DWN_SERVER_BACKGROUND_PROCESS || true
Expand Down
45 changes: 14 additions & 31 deletions packages/agent/web-test-runner.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,42 +6,25 @@ const playwrightLauncher =
* @type {import('@web/test-runner').TestRunnerConfig}
*/
module.exports = {
playwright : true,
nodeResolve : true,
files : 'tests/compiled/**/*.spec.js',
playwright : true,
nodeResolve : true,
browsers : [
playwrightLauncher({
product: 'chromium',
}),
playwrightLauncher({
product: 'firefox',
}),
playwrightLauncher({
product: 'webkit',
}),
],
testsFinishTimeout : 300000,
concurrentBrowsers : 2,
testFramework : {
config: {
timeout: '30000',
},
},
groups: [
{
name : 'chromium',
files : 'tests/compiled/**/*.spec.js',
browsers : [
playwrightLauncher({
product: 'chromium',
}),
],
},
{
name : 'firefox',
files : 'tests/compiled/**/*.spec.js',
browsers : [
playwrightLauncher({
product: 'firefox',
}),
],
},
{
name : 'webkit',
files : 'tests/compiled/**/*.spec.js',
browsers : [
playwrightLauncher({
product: 'webkit',
}),
],
},
],
};
45 changes: 14 additions & 31 deletions packages/api/web-test-runner.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,42 +6,25 @@ const playwrightLauncher =
* @type {import('@web/test-runner').TestRunnerConfig}
*/
module.exports = {
playwright : true,
nodeResolve : true,
files : 'tests/compiled/**/*.spec.js',
playwright : true,
nodeResolve : true,
browsers : [
playwrightLauncher({
product: 'chromium',
}),
playwrightLauncher({
product: 'firefox',
}),
playwrightLauncher({
product: 'webkit',
}),
],
testsFinishTimeout : 300000,
concurrentBrowsers : 2,
testFramework : {
config: {
timeout: '15000',
},
},
groups: [
{
name : 'chromium',
files : 'tests/compiled/**/*.spec.js',
browsers : [
playwrightLauncher({
product: 'chromium',
}),
],
},
{
name : 'firefox',
files : 'tests/compiled/**/*.spec.js',
browsers : [
playwrightLauncher({
product: 'firefox',
}),
],
},
{
name : 'webkit',
files : 'tests/compiled/**/*.spec.js',
browsers : [
playwrightLauncher({
product: 'webkit',
}),
],
},
],
};
45 changes: 14 additions & 31 deletions packages/common/web-test-runner.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,42 +6,25 @@ const playwrightLauncher =
* @type {import('@web/test-runner').TestRunnerConfig}
*/
module.exports = {
playwright : true,
nodeResolve : true,
files : 'tests/compiled/**/*.spec.js',
playwright : true,
nodeResolve : true,
browsers : [
playwrightLauncher({
product: 'chromium',
}),
playwrightLauncher({
product: 'firefox',
}),
playwrightLauncher({
product: 'webkit',
}),
],
testsFinishTimeout : 300000,
concurrentBrowsers : 2,
testFramework : {
config: {
timeout: '15000',
},
},
groups: [
{
name : 'chromium',
files : 'tests/compiled/**/*.spec.js',
browsers : [
playwrightLauncher({
product: 'chromium',
}),
],
},
{
name : 'firefox',
files : 'tests/compiled/**/*.spec.js',
browsers : [
playwrightLauncher({
product: 'firefox',
}),
],
},
{
name : 'webkit',
files : 'tests/compiled/**/*.spec.js',
browsers : [
playwrightLauncher({
product: 'webkit',
}),
],
},
],
};
45 changes: 14 additions & 31 deletions packages/credentials/web-test-runner.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,42 +6,25 @@ const playwrightLauncher =
* @type {import('@web/test-runner').TestRunnerConfig}
*/
module.exports = {
playwright : true,
nodeResolve : true,
files : 'tests/compiled/**/*.spec.js',
playwright : true,
nodeResolve : true,
browsers : [
playwrightLauncher({
product: 'chromium',
}),
playwrightLauncher({
product: 'firefox',
}),
playwrightLauncher({
product: 'webkit',
}),
],
testsFinishTimeout : 300000,
concurrentBrowsers : 2,
testFramework : {
config: {
timeout: '15000',
},
},
groups: [
{
name : 'chromium',
files : 'tests/compiled/**/*.spec.js',
browsers : [
playwrightLauncher({
product: 'chromium',
}),
],
},
{
name : 'firefox',
files : 'tests/compiled/**/*.spec.js',
browsers : [
playwrightLauncher({
product: 'firefox',
}),
],
},
{
name : 'webkit',
files : 'tests/compiled/**/*.spec.js',
browsers : [
playwrightLauncher({
product: 'webkit',
}),
],
},
],
};
45 changes: 14 additions & 31 deletions packages/crypto/web-test-runner.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,42 +6,25 @@ const playwrightLauncher =
* @type {import('@web/test-runner').TestRunnerConfig}
*/
module.exports = {
playwright : true,
nodeResolve : true,
files : 'tests/compiled/**/*.spec.js',
playwright : true,
nodeResolve : true,
browsers : [
playwrightLauncher({
product: 'chromium',
}),
playwrightLauncher({
product: 'firefox',
}),
playwrightLauncher({
product: 'webkit',
}),
],
testsFinishTimeout : 300000,
concurrentBrowsers : 2,
testFramework : {
config: {
timeout: '15000',
},
},
groups: [
{
name : 'chromium',
files : 'tests/compiled/**/*.spec.js',
browsers : [
playwrightLauncher({
product: 'chromium',
}),
],
},
{
name : 'firefox',
files : 'tests/compiled/**/*.spec.js',
browsers : [
playwrightLauncher({
product: 'firefox',
}),
],
},
{
name : 'webkit',
files : 'tests/compiled/**/*.spec.js',
browsers : [
playwrightLauncher({
product: 'webkit',
}),
],
},
],
};
45 changes: 14 additions & 31 deletions packages/dids/web-test-runner.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,42 +6,25 @@ const playwrightLauncher =
* @type {import('@web/test-runner').TestRunnerConfig}
*/
module.exports = {
playwright : true,
nodeResolve : true,
files : 'tests/compiled/**/*.spec.js',
playwright : true,
nodeResolve : true,
browsers : [
playwrightLauncher({
product: 'chromium',
}),
playwrightLauncher({
product: 'firefox',
}),
playwrightLauncher({
product: 'webkit',
}),
],
testsFinishTimeout : 300000,
concurrentBrowsers : 2,
testFramework : {
config: {
timeout: '15000',
},
},
groups: [
{
name : 'chromium',
files : 'tests/compiled/**/*.spec.js',
browsers : [
playwrightLauncher({
product: 'chromium',
}),
],
},
{
name : 'firefox',
files : 'tests/compiled/**/*.spec.js',
browsers : [
playwrightLauncher({
product: 'firefox',
}),
],
},
{
name : 'webkit',
files : 'tests/compiled/**/*.spec.js',
browsers : [
playwrightLauncher({
product: 'webkit',
}),
],
},
],
};
Loading

0 comments on commit b30bb0b

Please sign in to comment.