Skip to content

Commit

Permalink
test: rebalance tests across workers
Browse files Browse the repository at this point in the history
  • Loading branch information
mrstork committed Dec 31, 2024
1 parent bcae876 commit 543ecc5
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ jobs:
env:
# split tests across multiple machines
CI_NODE_INDEX: ${{ matrix.machine }}
CI_NODE_TOTAL: 4
CI_NODE_TOTAL: 5
with:
timeout_minutes: 30
max_attempts: 3
Expand Down
80 changes: 52 additions & 28 deletions packages/build/tests-metadata.json
Original file line number Diff line number Diff line change
@@ -1,102 +1,126 @@
{
"tests/env/tests.js": {
"tests/deploy/tests.js": {
"order": 0,
"machine": 0
},
"tests/plugins_list/tests.js": {
"order": 1,
"machine": 0
},
"tests/telemetry/tests.js": {
"tests/unit/logger/tests.js": {
"order": 2,
"machine": 0
},
"tests/unit/logger/tests.js": {
"tests/unit/validate_edge_manifest/tests.js": {
"order": 3,
"machine": 0
},
"tests/functions/tests.js": {
"tests/blobs_upload/tests.js": {
"order": 4,
"machine": 1
},
"tests/monitor/tests.js": {
"tests/error/tests.js": {
"order": 5,
"machine": 1
},
"tests/mutate_headers_redirects/tests.js": {
"tests/stack/tests.js": {
"order": 6,
"machine": 1
},
"tests/plugins_events/tests.js": {
"tests/status/tests.js": {
"order": 7,
"machine": 1
},
"tests/stack/tests.js": {
"tests/steps/tests.js": {
"order": 8,
"machine": 1
},
"tests/status/tests.js": {
"tests/tracing/tests.js": {
"order": 9,
"machine": 1
},
"tests/time/tests.js": {
"tests/utils_build/tests.js": {
"order": 10,
"machine": 1
},
"tests/constants/tests.js": {
"tests/env/tests.js": {
"order": 11,
"machine": 2
},
"tests/deploy/tests.js": {
"tests/error_reporting/tests.js": {
"order": 12,
"machine": 2
},
"tests/error/tests.js": {
"tests/log/tests.js": {
"order": 13,
"machine": 2
},
"tests/utils_build/tests.js": {
"tests/mutate_save/tests.js": {
"order": 14,
"machine": 2
},
"tests/core/tests.js": {
"tests/plugins_events/tests.js": {
"order": 15,
"machine": 3
"machine": 2
},
"tests/edge_functions/tests.js": {
"tests/plugins/tests.js": {
"order": 16,
"machine": 3
"machine": 2
},
"tests/install/tests.js": {
"tests/constants/tests.js": {
"order": 17,
"machine": 3
},
"tests/log/tests.js": {
"tests/functions/tests.js": {
"order": 18,
"machine": 3
},
"tests/manifest/tests.js": {
"tests/install/tests.js": {
"order": 19,
"machine": 3
},
"tests/plugins/tests.js": {
"tests/manifest/tests.js": {
"order": 20,
"machine": 3
},
"tests/steps/tests.js": {
"tests/mutate/tests.js": {
"order": 21,
"machine": 3
},
"tests/secrets_scanning/tests.js": {
"tests/pre_cleanup/tests.js": {
"order": 22,
"machine": 4
"machine": 3
},
"tests/mutate_save/tests.js": {
"tests/telemetry/tests.js": {
"order": 23,
"machine": 4
"machine": 3
},
"tests/mutate/tests.js": {
"tests/core/tests.js": {
"order": 24,
"machine": 4
},
"tests/edge_functions/tests.js": {
"order": 25,
"machine": 4
},
"tests/frameworks_api/tests.js": {
"order": 26,
"machine": 4
},
"tests/monitor/tests.js": {
"order": 27,
"machine": 4
},
"tests/mutate_headers_redirects/tests.js": {
"order": 28,
"machine": 4
},
"tests/secrets_scanning/tests.js": {
"order": 29,
"machine": 4
},
"tests/time/tests.js": {
"order": 30,
"machine": 4
}
}
2 changes: 1 addition & 1 deletion tools/tests-duration.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { resolve } from 'path'
import { execa } from 'execa'
import { globby } from 'globby'

const CI_MACHINES = 4
const CI_MACHINES = 5

const measureDurations = async () => {
const { default: config } = await import(resolve('ava.config.js'))
Expand Down

0 comments on commit 543ecc5

Please sign in to comment.