-
Notifications
You must be signed in to change notification settings - Fork 28
/
playwright.yml
60 lines (59 loc) · 1.66 KB
/
playwright.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Playwright Tests
on:
pull_request:
branches:
- master
- develop
jobs:
e2e_test:
name: E2Eテスト
runs-on: ubuntu-latest
strategy:
matrix:
php: [7.4, 8.0, 8.1]
services:
mysql:
image: mysql:5.7
ports:
- 3306
env:
MYSQL_ROOT_PASSWORD: wordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Cache multiple paths
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- name: install npm scripts
run: npm install
- name: wp-env start
run: ./node_modules/@wordpress/env/bin/wp-env start
- name: install composer
run: ./node_modules/@wordpress/env/bin/wp-env run composer 'composer install'
- name: Change file permission
run: |
chmod 777 ./
chmod 777 ./_theme.json
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test --trace on --project=chromium
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30