2020-11-16 04:33:06 +00:00
|
|
|
name: E2E tests
|
|
|
|
on: [pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
e2e-tests:
|
2021-03-12 01:14:35 +00:00
|
|
|
runs-on: ubuntu-18.04
|
2020-11-16 04:33:06 +00:00
|
|
|
steps:
|
2021-02-01 02:24:11 +00:00
|
|
|
- name: Cancel Previous Runs
|
|
|
|
uses: styfle/cancel-workflow-action@0.7.0
|
|
|
|
with:
|
|
|
|
access_token: ${{ github.token }}
|
2020-11-16 04:33:06 +00:00
|
|
|
- name: Check out repository code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup PHP
|
2021-01-06 23:51:43 +00:00
|
|
|
uses: shivammathur/setup-php@2.9.0
|
2020-11-16 04:33:06 +00:00
|
|
|
with:
|
|
|
|
php-version: '7.3'
|
|
|
|
- name: Install PHP dependencies
|
|
|
|
run: |
|
|
|
|
composer self-update 2.0.6
|
|
|
|
composer i
|
|
|
|
- name: Setup Node.js
|
|
|
|
uses: actions/setup-node@v2-beta
|
|
|
|
with:
|
|
|
|
node-version: '14'
|
2022-03-04 04:01:16 +00:00
|
|
|
- name: Install PNPM and install dependencies
|
|
|
|
uses: pnpm/action-setup@v2.2.1
|
|
|
|
with:
|
|
|
|
version: ^6.24.2
|
|
|
|
run_install: true
|
2021-04-05 00:09:36 +00:00
|
|
|
- name: Build and run E2E Tests
|
2020-11-16 04:33:06 +00:00
|
|
|
env:
|
2021-04-05 00:09:36 +00:00
|
|
|
WC_E2E_SCREENSHOTS: 1
|
|
|
|
E2E_SLACK_CHANNEL: ${{ secrets.E2E_SLACK_CHANNEL }}
|
|
|
|
E2E_SLACK_TOKEN: ${{ secrets.E2E_SLACK_TOKEN }}
|
2021-08-18 21:20:17 +00:00
|
|
|
WP_VERSION: '5.8.0'
|
2020-11-16 04:33:06 +00:00
|
|
|
run: |
|
|
|
|
composer require wp-cli/i18n-command
|
2022-03-04 04:01:16 +00:00
|
|
|
pnpm run build
|
|
|
|
pnpm run e2e:docker-up
|
2021-04-22 15:18:15 +00:00
|
|
|
sleep 10
|
2022-03-04 04:01:16 +00:00
|
|
|
pnpm exec wc-e2e test:e2e
|
2021-04-26 16:41:38 +00:00
|
|
|
- name: Archive e2e test screenshots
|
|
|
|
if: ${{ always() }}
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: e2e-screenshots
|
|
|
|
path: tests/e2e/screenshots
|
|
|
|
if-no-files-found: ignore
|
|
|
|
retention-days: 5
|