-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7d45cc1
commit bd248f0
Showing
3 changed files
with
73 additions
and
55 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,78 @@ | ||
name: Playwright Tests | ||
|
||
on: | ||
- pull_request | ||
- push | ||
|
||
jobs: | ||
test: | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
|
||
build: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
node: | ||
- 18.12.0 | ||
os: | ||
- macos-latest | ||
- ubuntu-20.04 | ||
- windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Install Playwright Browsers | ||
run: npx playwright install --with-deps | ||
- name: Run Playwright tests | ||
run: npx playwright test | ||
- uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: playwright-report | ||
path: playwright-report/ | ||
retention-days: 30 | ||
- name: Set git to use LF | ||
run: | | ||
git config --global core.autocrlf false | ||
git config --global core.eol lf | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
cache: "yarn" | ||
|
||
- name: Restore | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
node_modules | ||
*/*/node_modules | ||
key: 2022-10-11-${{ runner.os }}-${{ hashFiles('**/yarn.lock')}} | ||
|
||
- name: Install libudev | ||
if: matrix.os == 'ubuntu-20.04' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libudev-dev | ||
- name: Install Lerna | ||
run: yarn global add lerna | ||
|
||
- name: Bootstrap | ||
run: yarn | ||
env: | ||
CI: false | ||
|
||
- name: Package for E2E | ||
run: yarn package:e2e | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CI: true | ||
|
||
- name: E2E Test | ||
run: | | ||
cd packages/e2e | ||
yarn test:e2e | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CI: true | ||
|
||
- name: Upload Test Results | ||
if: always() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: screenshots | ||
path: tests/screenshots/** | ||
|
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
bd248f0
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.
Packaging for test is done in 8661286495