-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add job matrix #92
base: pw
Are you sure you want to change the base?
add job matrix #92
Changes from 1 commit
5290512
d647885
5c1535c
e6e478d
2f2227f
ab60fbf
d016d87
6b6b825
8503d05
681612b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -69,6 +69,9 @@ jobs: | |||||||||||||
tests: | ||||||||||||||
name: e2e_api tests | ||||||||||||||
runs-on: ubuntu-latest | ||||||||||||||
strategy: | ||||||||||||||
matrix: | ||||||||||||||
test_group: [e2e_1, e2e_2] | ||||||||||||||
|
||||||||||||||
steps: | ||||||||||||||
- name: Checkout testing repo | ||||||||||||||
|
@@ -161,13 +164,17 @@ jobs: | |||||||||||||
# npm run pw:deps-only | ||||||||||||||
|
||||||||||||||
# Run e2e tests | ||||||||||||||
- name: 🧪 Run e2e tests | ||||||||||||||
- name: 🧪 Run e2e tests ${{ matrix.group }} | ||||||||||||||
id: e2e-test | ||||||||||||||
if: success() && (github.event_name != 'workflow_dispatch' || ( github.event_name == 'workflow_dispatch' && (github.event.inputs.testsuite == 'E2E' || github.event.inputs.testsuite == 'All'))) | ||||||||||||||
timeout-minutes: 40 | ||||||||||||||
working-directory: tests/pw | ||||||||||||||
run: | | ||||||||||||||
npm run test:e2e | ||||||||||||||
if [[ "${{ matrix.group }}" == e2e_1 ]]; then | ||||||||||||||
npx playwright test --project=${{ matrix.group }} --config=e2e.config.ts | ||||||||||||||
elif [[ "${{ matrix.group }}" == a2e_2 ]]; then | ||||||||||||||
npx playwright test --project=${{ matrix.group }} --config=e2e.config.ts | ||||||||||||||
fi | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Simplify the test execution logic and fix the typo. There are several issues in the test execution step:
Apply this fix: - if [[ "${{ matrix.group }}" == e2e_1 ]]; then
- npx playwright test --project=${{ matrix.group }} --config=e2e.config.ts
- elif [[ "${{ matrix.group }}" == a2e_2 ]]; then
- npx playwright test --project=${{ matrix.group }} --config=e2e.config.ts
- fi
+ npx playwright test --project=${{ matrix.group }} --config=e2e.config.ts 📝 Committable suggestion
Suggested change
|
||||||||||||||
|
||||||||||||||
# Run e2e coverage | ||||||||||||||
- name: 🧪 Run e2e coverage | ||||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -151,6 +151,24 @@ export default defineConfig({ | |
// teardown: NO_SETUP ? undefined : 'coverage_report', | ||
}, | ||
|
||
|
||
// e2e_tests | ||
{ | ||
name: 'e2e_1', | ||
testMatch: /.*\.spec\.ts/, | ||
grep: [/@e2e_1/], | ||
dependencies: NO_SETUP ? [] : ['e2e_setup'], | ||
}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification 🛠️ Refactor suggestion Remove or update the The codebase analysis confirms that there is an existing
🔗 Analysis chainConsider removing or updating the existing e2e_tests project. The new matrix projects (
Let me check if there's an existing Let me fix the regex and try again to find the e2e_tests configuration. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Check if there are any test files that don't have matrix tags
rg -l "test\(" --type ts | xargs rg -L "@e2e_[12]"
Length of output: 299 Script: #!/bin/bash
# Check for e2e_tests project configuration
rg -A 10 "e2e_tests.*{" tests/pw/e2e.config.ts
Length of output: 136 Script: #!/bin/bash
# Check for e2e_tests project configuration
rg "name: ['\"](e2e_tests|e2e_1|e2e_2)['\"]" -B2 -A8 tests/pw/e2e.config.ts
Length of output: 942 |
||
|
||
|
||
// e2e_tests | ||
{ | ||
name: 'e2e_2', | ||
testMatch: /.*\.spec\.ts/, | ||
grep: [/@e2e_2/], | ||
dependencies: NO_SETUP ? [] : ['e2e_setup'], | ||
}, | ||
|
||
// coverage_report | ||
{ | ||
name: 'coverage_report', | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix matrix strategy indentation.
The matrix strategy section has incorrect indentation. It should be indented under the strategy key.
Apply this fix:
📝 Committable suggestion
🧰 Tools
🪛 actionlint (1.7.4)
72-72: "strategy" section should not be empty. please remove this section if it's unnecessary
(syntax-check)
73-73: unexpected key "matrix" for "job" section. expected one of "concurrency", "container", "continue-on-error", "defaults", "env", "environment", "if", "name", "needs", "outputs", "permissions", "runs-on", "secrets", "services", "steps", "strategy", "timeout-minutes", "uses", "with"
(syntax-check)