New Badgeブロック新規追加 #528
Workflow file for this run
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
name: Playwright Tests | |
on: | |
pull_request: | |
branches: [ develop ] | |
jobs: | |
test: | |
timeout-minutes: 60 | |
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 | |
- 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: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 14.x | |
- name: install npm scripts | |
run: npm install | |
- name: install Composer Package | |
run: composer install | |
- name: Install WP-CLI | |
run: | | |
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar | |
chmod +x wp-cli.phar | |
mv wp-cli.phar /usr/local/bin/wp | |
- name: Build | |
run: npm run build | |
- name: Run Environment | |
run: npx wp-env start | |
- name: Install dependencies //////////////////////// | |
run: npm ci | |
- name: Install Playwright Browsers | |
run: npx playwright install --with-deps | |
# タクソノミーのテストはワークフロー上だと環境の都合でうまく動作させられないので login.spec.ts だけテスト | |
# ローカルで以下のコマンドで test/e2e/ 内のテストをすべて実行する | |
# npx playwright test --trace on --project=chromium | |
- name: Run Playwright | |
run: | | |
npx playwright test --trace on --project=chromium test/e2e/login.spec.ts | |
npx playwright test --trace on --project=chromium test/e2e/common-margin.spec.ts | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 |