woocommerce/plugins/woocommerce-admin/.github/workflows/e2e.yml

51 lines
1.7 KiB
YAML
Raw Normal View History

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: Install PNPM and install dependencies
uses: pnpm/action-setup@v2.2.1
with:
version: ^6.24.2
run_install: true
- 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 }}
WP_VERSION: '5.8.0'
run: |
composer require wp-cli/i18n-command
pnpm run build
pnpm run e2e:docker-up
sleep 10
pnpm exec 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