46 lines
1.5 KiB
YAML
46 lines
1.5 KiB
YAML
name: E2E tests
|
|
on: [pull_request]
|
|
|
|
jobs:
|
|
e2e-tests:
|
|
runs-on: ubuntu-18.04
|
|
steps:
|
|
- name: Cancel Previous Runs
|
|
uses: styfle/cancel-workflow-action@0.7.0
|
|
with:
|
|
access_token: ${{ github.token }}
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v2
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@2.9.0
|
|
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'
|
|
- name: Build and run E2E Tests
|
|
env:
|
|
WC_E2E_SCREENSHOTS: 1
|
|
E2E_SLACK_CHANNEL: ${{ secrets.E2E_SLACK_CHANNEL }}
|
|
E2E_SLACK_TOKEN: ${{ secrets.E2E_SLACK_TOKEN }}
|
|
run: |
|
|
npm i
|
|
composer require wp-cli/i18n-command
|
|
npm run build
|
|
npx wc-e2e docker:up
|
|
sleep 10
|
|
npx wc-e2e test:e2e
|
|
- 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
|