-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: run unit tests in WebKit and Firefox
- Loading branch information
Showing
7 changed files
with
51 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ on: | |
|
||
jobs: | ||
linkChecker: | ||
name: Link Checker | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
name: Playwright tests | ||
name: Unit & Integration Tests | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
playwright: | ||
tests-linux: | ||
name: Unit & Integration Tests - ${{ matrix.browser }} | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
browser: [chromium, firefox, chrome, edge] | ||
name: Playwright Tests - ${{ matrix.browser }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
@@ -37,13 +37,29 @@ jobs: | |
path: packages/integration-tests/blob-report | ||
retention-days: 1 | ||
|
||
playwright-macos: | ||
- name: Run Unit Tests | ||
if: ${{ matrix.browser != 'edge' && matrix.browser != 'chrome' }} | ||
# Firefox tests are flaky. | ||
#Remove once this issue is resolved: https://github.com/vitest-dev/vitest/issues/7377 | ||
continue-on-error: ${{ matrix.browser == 'firefox' }} | ||
run: npm run test:unit -- --browser.name=${{ matrix.browser }} | ||
|
||
- name: Upload test:unit report | ||
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 | ||
if: ${{ !cancelled() && matrix.browser != 'edge' && matrix.browser != 'chrome' }} | ||
with: | ||
name: vitest-report-${{ matrix.browser }}-attempt-${{ github.run_attempt }} | ||
path: vitest-report/ | ||
retention-days: 14 | ||
|
||
tests-macos: | ||
timeout-minutes: 60 | ||
runs-on: macos-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
browser: [webkit] | ||
name: Unit & Integration Tests - ${{ matrix.browser }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
@@ -70,9 +86,13 @@ jobs: | |
path: packages/integration-tests/blob-report | ||
retention-days: 1 | ||
|
||
- name: Run Unit Tests | ||
run: npm run test:unit -- --browser.name=${{ matrix.browser }} | ||
|
||
merge-reports: | ||
name: Merge playwright reports | ||
if: ${{ !cancelled() }} | ||
needs: [playwright, playwright-macos] | ||
needs: [tests-linux, tests-macos] | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -104,13 +124,14 @@ jobs: | |
retention-days: 14 | ||
|
||
check-failure: | ||
needs: [playwright, playwright-macos, merge-reports] | ||
name: Check if all tests passed | ||
needs: [tests-linux, tests-macos, merge-reports] | ||
runs-on: ubuntu-latest | ||
if: ${{ always() }} | ||
steps: | ||
- name: Check if any playwright tests failed | ||
run: | | ||
if [ "${{ needs.playwright.result }}" != "success" ] || [ "${{ needs['playwright-macos'].result }}" != "success" ]; then | ||
if [ "${{ needs['tests-linux'].result }}" != "success" ] || [ "${{ needs['tests-macos'].result }}" != "success" ]; then | ||
echo "One or more tests failed." | ||
exit 1 | ||
else | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters