Skip to content

Commit 7dca541

Browse files
committed
Add playwright-mobile task in Github actions
1 parent b6dc103 commit 7dca541

1 file changed

Lines changed: 52 additions & 4 deletions

File tree

.github/workflows/main.yml

Lines changed: 52 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ name: Commit checks
33
on: [push]
44

55
jobs:
6-
playwright:
7-
name: Playwright test
6+
playwright-chromium:
7+
name: Playwright Chrome test
88
timeout-minutes: 30
99
runs-on: ubuntu-latest
1010
steps:
@@ -34,8 +34,56 @@ jobs:
3434
- name: Install playwright browsers
3535
run: yarn playwright install chromium
3636

37-
- name: Run end-to-end tests
38-
run: yarn test:playwright-local:ci
37+
- name: Run Playwright Chrome Tests
38+
run: yarn test:playwright-local:ci:chromium
39+
continue-on-error: false
40+
env:
41+
NODE_ENV: development
42+
REACT_APP_ENDPOINT_URL: ${{ secrets.REACT_APP_ENDPOINT_URL }}
43+
FORCE_COLOR: 1
44+
45+
# Test run video was always captured, so this action uses "always()" condition
46+
- name: Upload videos
47+
uses: actions/upload-artifact@v4
48+
if: always()
49+
with:
50+
name: playwright-report
51+
path: playwright-report/
52+
retention-days: 3
53+
54+
playwright-mobile:
55+
name: Playwright Mobile test
56+
timeout-minutes: 30
57+
runs-on: ubuntu-latest
58+
steps:
59+
- name: Checkout
60+
uses: actions/checkout@v3
61+
62+
- name: Set up Node
63+
uses: actions/setup-node@v3
64+
with:
65+
node-version: 16
66+
67+
- name: Restore packages cache
68+
uses: actions/cache@v3
69+
with:
70+
path: '**/node_modules'
71+
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
72+
73+
- name: Install dependencies
74+
run: |
75+
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
76+
yarn install --frozen-lockfile --ignore-scripts
77+
npm rebuild node-sass
78+
rm .npmrc
79+
env:
80+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
81+
82+
- name: Install playwright browsers (WebKit)
83+
run: yarn playwright install webkit
84+
85+
- name: Run Mobile WebKit Tests
86+
run: yarn test:playwright-local:ci:mobile
3987
continue-on-error: false
4088
env:
4189
NODE_ENV: development

0 commit comments

Comments
 (0)