Updating all instances of pnpx to pnpm dlx/exec
This commit is contained in:
parent
1e3a3d8af5
commit
1c162a14d2
|
@ -68,7 +68,7 @@ jobs:
|
||||||
|
|
||||||
- name: Load docker images and start containers.
|
- name: Load docker images and start containers.
|
||||||
working-directory: package/woocommerce/plugins/woocommerce
|
working-directory: package/woocommerce/plugins/woocommerce
|
||||||
run: pnpx wc-e2e docker:up
|
run: pnpm exec wc-e2e docker:up
|
||||||
|
|
||||||
- name: Run tests command.
|
- name: Run tests command.
|
||||||
working-directory: package/woocommerce/plugins/woocommerce
|
working-directory: package/woocommerce/plugins/woocommerce
|
||||||
|
@ -76,7 +76,7 @@ jobs:
|
||||||
WC_E2E_SCREENSHOTS: 1
|
WC_E2E_SCREENSHOTS: 1
|
||||||
E2E_SLACK_TOKEN: ${{ secrets.E2E_SLACK_TOKEN }}
|
E2E_SLACK_TOKEN: ${{ secrets.E2E_SLACK_TOKEN }}
|
||||||
E2E_SLACK_CHANNEL: ${{ secrets.E2E_SLACK_CHANNEL }}
|
E2E_SLACK_CHANNEL: ${{ secrets.E2E_SLACK_CHANNEL }}
|
||||||
run: pnpx wc-e2e test:e2e
|
run: pnpm exec wc-e2e test:e2e
|
||||||
|
|
||||||
- name: Archive E2E test screenshots
|
- name: Archive E2E test screenshots
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
|
@ -127,7 +127,7 @@ jobs:
|
||||||
|
|
||||||
- name: Load docker images and start containers.
|
- name: Load docker images and start containers.
|
||||||
working-directory: package/woocommerce/plugins/woocommerce
|
working-directory: package/woocommerce/plugins/woocommerce
|
||||||
run: pnpx wc-e2e docker:up
|
run: pnpm exec wc-e2e docker:up
|
||||||
|
|
||||||
- name: Run tests command.
|
- name: Run tests command.
|
||||||
working-directory: package/woocommerce/plugins/woocommerce
|
working-directory: package/woocommerce/plugins/woocommerce
|
||||||
|
@ -135,15 +135,15 @@ jobs:
|
||||||
BASE_URL: http://localhost:8084
|
BASE_URL: http://localhost:8084
|
||||||
USER_KEY: admin
|
USER_KEY: admin
|
||||||
USER_SECRET: password
|
USER_SECRET: password
|
||||||
run: pnpx wc-api-tests test api
|
run: pnpm exec wc-api-tests test api
|
||||||
|
|
||||||
- name: Upload API test report
|
- name: Upload API test report
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: api-test-report---pr-${{ github.event.number }}
|
name: api-test-report---pr-${{ github.event.number }}
|
||||||
path: |
|
path: |
|
||||||
package/woocommerce/packages/js/api-core-tests/allure-results
|
package/woocommerce/packages/js/api-core-tests/allure-results
|
||||||
package/woocommerce/packages/js/api-core-tests/allure-report
|
package/woocommerce/packages/js/api-core-tests/allure-report
|
||||||
retention-days: 7
|
retention-days: 7
|
||||||
|
|
||||||
k6-tests-run:
|
k6-tests-run:
|
||||||
|
@ -190,7 +190,7 @@ jobs:
|
||||||
|
|
||||||
- name: Load docker images and start containers.
|
- name: Load docker images and start containers.
|
||||||
working-directory: package/woocommerce/plugins/woocommerce
|
working-directory: package/woocommerce/plugins/woocommerce
|
||||||
run: pnpx wc-e2e docker:up
|
run: pnpm exec wc-e2e docker:up
|
||||||
|
|
||||||
- name: Install k6
|
- name: Install k6
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -1,110 +1,110 @@
|
||||||
name: Run smoke tests against pull request.
|
name: Run smoke tests against pull request.
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- trunk
|
- trunk
|
||||||
types:
|
types:
|
||||||
- labeled
|
- labeled
|
||||||
jobs:
|
jobs:
|
||||||
prcheck:
|
prcheck:
|
||||||
name: Smoke test a pull request.
|
name: Smoke test a pull request.
|
||||||
if: "${{ contains(github.event.label.name, 'run: smoke tests') }}"
|
if: "${{ contains(github.event.label.name, 'run: smoke tests') }}"
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
steps:
|
steps:
|
||||||
- name: Cancel Previous Runs
|
- name: Cancel Previous Runs
|
||||||
uses: styfle/cancel-workflow-action@0.7.0
|
uses: styfle/cancel-workflow-action@0.7.0
|
||||||
with:
|
with:
|
||||||
access_token: ${{ github.token }}
|
access_token: ${{ github.token }}
|
||||||
|
|
||||||
- name: Create dirs.
|
- name: Create dirs.
|
||||||
run: |
|
run: |
|
||||||
mkdir -p code/woocommerce
|
mkdir -p code/woocommerce
|
||||||
mkdir -p package/woocommerce
|
mkdir -p package/woocommerce
|
||||||
mkdir -p tmp/woocommerce
|
mkdir -p tmp/woocommerce
|
||||||
mkdir -p node_modules
|
mkdir -p node_modules
|
||||||
|
|
||||||
- name: Checkout code.
|
- name: Checkout code.
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
path: package/woocommerce
|
path: package/woocommerce
|
||||||
|
|
||||||
- name: Install prerequisites.
|
- name: Install prerequisites.
|
||||||
working-directory: package/woocommerce/plugins/woocommerce
|
working-directory: package/woocommerce/plugins/woocommerce
|
||||||
id: installation
|
id: installation
|
||||||
run: |
|
run: |
|
||||||
npm install -g pnpm
|
npm install -g pnpm
|
||||||
pnpm install
|
pnpm install
|
||||||
pnpm nx composer-install-no-dev woocommerce
|
pnpm nx composer-install-no-dev woocommerce
|
||||||
pnpm nx build-assets woocommerce
|
pnpm nx build-assets woocommerce
|
||||||
pnpm install jest
|
pnpm install jest
|
||||||
|
|
||||||
- name: Run smoke test.
|
- name: Run smoke test.
|
||||||
working-directory: package/woocommerce/plugins/woocommerce
|
working-directory: package/woocommerce/plugins/woocommerce
|
||||||
if: always()
|
if: always()
|
||||||
env:
|
env:
|
||||||
SMOKE_TEST_URL: ${{ secrets.SMOKE_TEST_URL }}
|
SMOKE_TEST_URL: ${{ secrets.SMOKE_TEST_URL }}
|
||||||
SMOKE_TEST_ADMIN_USER: ${{ secrets.SMOKE_TEST_ADMIN_USER }}
|
SMOKE_TEST_ADMIN_USER: ${{ secrets.SMOKE_TEST_ADMIN_USER }}
|
||||||
SMOKE_TEST_ADMIN_PASSWORD: ${{ secrets.SMOKE_TEST_ADMIN_PASSWORD }}
|
SMOKE_TEST_ADMIN_PASSWORD: ${{ secrets.SMOKE_TEST_ADMIN_PASSWORD }}
|
||||||
SMOKE_TEST_ADMIN_USER_EMAIL: ${{ secrets.SMOKE_TEST_ADMIN_USER_EMAIL }}
|
SMOKE_TEST_ADMIN_USER_EMAIL: ${{ secrets.SMOKE_TEST_ADMIN_USER_EMAIL }}
|
||||||
SMOKE_TEST_CUSTOMER_USER: ${{ secrets.SMOKE_TEST_CUSTOMER_USER }}
|
SMOKE_TEST_CUSTOMER_USER: ${{ secrets.SMOKE_TEST_CUSTOMER_USER }}
|
||||||
SMOKE_TEST_CUSTOMER_PASSWORD: ${{ secrets.SMOKE_TEST_CUSTOMER_PASSWORD }}
|
SMOKE_TEST_CUSTOMER_PASSWORD: ${{ secrets.SMOKE_TEST_CUSTOMER_PASSWORD }}
|
||||||
WC_E2E_SCREENSHOTS: 1
|
WC_E2E_SCREENSHOTS: 1
|
||||||
E2E_RETEST: 1
|
E2E_RETEST: 1
|
||||||
E2E_SLACK_TOKEN: ${{ secrets.SMOKE_TEST_SLACK_TOKEN }}
|
E2E_SLACK_TOKEN: ${{ secrets.SMOKE_TEST_SLACK_TOKEN }}
|
||||||
E2E_SLACK_CHANNEL: ${{ secrets.SMOKE_TEST_SLACK_CHANNEL }}
|
E2E_SLACK_CHANNEL: ${{ secrets.SMOKE_TEST_SLACK_CHANNEL }}
|
||||||
UPDATE_WC: 1
|
UPDATE_WC: 1
|
||||||
DEFAULT_TIMEOUT_OVERRIDE: 120000
|
DEFAULT_TIMEOUT_OVERRIDE: 120000
|
||||||
run: |
|
run: |
|
||||||
pnpx wc-e2e test:e2e tests/e2e/specs/smoke-tests/update-woocommerce.js
|
pnpm exec wc-e2e test:e2e tests/e2e/specs/smoke-tests/update-woocommerce.js
|
||||||
|
|
||||||
- name: Post Smoke tests results comment on PR
|
- name: Post Smoke tests results comment on PR
|
||||||
if: always()
|
if: always()
|
||||||
uses: actions/github-script@v5
|
uses: actions/github-script@v5
|
||||||
env:
|
env:
|
||||||
TITLE: 'Smoke Test Results'
|
TITLE: 'Smoke Test Results'
|
||||||
SMOKE_TEST_URL: ${{ secrets.SMOKE_TEST_URL }}
|
SMOKE_TEST_URL: ${{ secrets.SMOKE_TEST_URL }}
|
||||||
with:
|
with:
|
||||||
github-token: ${{secrets.GITHUB_TOKEN}}
|
github-token: ${{secrets.GITHUB_TOKEN}}
|
||||||
script: |
|
script: |
|
||||||
const script = require( './package/woocommerce/packages/js/e2e-environment/bin/post-results-to-github-pr.js' )
|
const script = require( './package/woocommerce/packages/js/e2e-environment/bin/post-results-to-github-pr.js' )
|
||||||
await script({github, context})
|
await script({github, context})
|
||||||
|
|
||||||
- name: Run E2E tests.
|
- name: Run E2E tests.
|
||||||
working-directory: package/woocommerce/plugins/woocommerce
|
working-directory: package/woocommerce/plugins/woocommerce
|
||||||
if: always()
|
if: always()
|
||||||
env:
|
env:
|
||||||
SMOKE_TEST_URL: ${{ secrets.SMOKE_TEST_URL }}
|
SMOKE_TEST_URL: ${{ secrets.SMOKE_TEST_URL }}
|
||||||
SMOKE_TEST_ADMIN_USER: ${{ secrets.SMOKE_TEST_ADMIN_USER }}
|
SMOKE_TEST_ADMIN_USER: ${{ secrets.SMOKE_TEST_ADMIN_USER }}
|
||||||
SMOKE_TEST_ADMIN_PASSWORD: ${{ secrets.SMOKE_TEST_ADMIN_PASSWORD }}
|
SMOKE_TEST_ADMIN_PASSWORD: ${{ secrets.SMOKE_TEST_ADMIN_PASSWORD }}
|
||||||
SMOKE_TEST_ADMIN_USER_EMAIL: ${{ secrets.SMOKE_TEST_ADMIN_USER_EMAIL }}
|
SMOKE_TEST_ADMIN_USER_EMAIL: ${{ secrets.SMOKE_TEST_ADMIN_USER_EMAIL }}
|
||||||
SMOKE_TEST_CUSTOMER_USER: ${{ secrets.SMOKE_TEST_CUSTOMER_USER }}
|
SMOKE_TEST_CUSTOMER_USER: ${{ secrets.SMOKE_TEST_CUSTOMER_USER }}
|
||||||
SMOKE_TEST_CUSTOMER_PASSWORD: ${{ secrets.SMOKE_TEST_CUSTOMER_PASSWORD }}
|
SMOKE_TEST_CUSTOMER_PASSWORD: ${{ secrets.SMOKE_TEST_CUSTOMER_PASSWORD }}
|
||||||
WC_E2E_SCREENSHOTS: 1
|
WC_E2E_SCREENSHOTS: 1
|
||||||
E2E_RETEST: 1
|
E2E_RETEST: 1
|
||||||
E2E_SLACK_TOKEN: ${{ secrets.SMOKE_TEST_SLACK_TOKEN }}
|
E2E_SLACK_TOKEN: ${{ secrets.SMOKE_TEST_SLACK_TOKEN }}
|
||||||
E2E_SLACK_CHANNEL: ${{ secrets.SMOKE_TEST_SLACK_CHANNEL }}
|
E2E_SLACK_CHANNEL: ${{ secrets.SMOKE_TEST_SLACK_CHANNEL }}
|
||||||
UPDATE_WC: 1
|
UPDATE_WC: 1
|
||||||
DEFAULT_TIMEOUT_OVERRIDE: 120000
|
DEFAULT_TIMEOUT_OVERRIDE: 120000
|
||||||
run: |
|
run: |
|
||||||
pnpx wc-e2e test:e2e
|
pnpm exec wc-e2e test:e2e
|
||||||
|
|
||||||
- name: Post E2E tests results comment on PR
|
- name: Post E2E tests results comment on PR
|
||||||
if: always()
|
if: always()
|
||||||
uses: actions/github-script@v5
|
uses: actions/github-script@v5
|
||||||
env:
|
env:
|
||||||
TITLE: 'E2E Test Results'
|
TITLE: 'E2E Test Results'
|
||||||
SMOKE_TEST_URL: ${{ secrets.SMOKE_TEST_URL }}
|
SMOKE_TEST_URL: ${{ secrets.SMOKE_TEST_URL }}
|
||||||
with:
|
with:
|
||||||
github-token: ${{secrets.GITHUB_TOKEN}}
|
github-token: ${{secrets.GITHUB_TOKEN}}
|
||||||
script: |
|
script: |
|
||||||
const script = require( './package/woocommerce/packages/js/e2e-environment/bin/post-results-to-github-pr.js' )
|
const script = require( './package/woocommerce/packages/js/e2e-environment/bin/post-results-to-github-pr.js' )
|
||||||
await script({github, context})
|
await script({github, context})
|
||||||
|
|
||||||
- name: Remove label from pull request.
|
- name: Remove label from pull request.
|
||||||
if: |
|
if: |
|
||||||
always()
|
always()
|
||||||
&& contains( github.event.pull_request.labels.*.name, format('run{0} smoke tests', ':'))
|
&& contains( github.event.pull_request.labels.*.name, format('run{0} smoke tests', ':'))
|
||||||
uses: actions-ecosystem/action-remove-labels@v1
|
uses: actions-ecosystem/action-remove-labels@v1
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
labels: 'run: smoke tests'
|
labels: 'run: smoke tests'
|
||||||
|
|
|
@ -1,154 +1,153 @@
|
||||||
name: Smoke test daily
|
name: Smoke test daily
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '25 3 * * *'
|
- cron: '25 3 * * *'
|
||||||
jobs:
|
jobs:
|
||||||
login-run:
|
login-run:
|
||||||
name: Daily smoke test on trunk.
|
name: Daily smoke test on trunk.
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
steps:
|
steps:
|
||||||
|
- name: Create dirs.
|
||||||
|
run: |
|
||||||
|
mkdir -p code/woocommerce
|
||||||
|
mkdir -p package/woocommerce
|
||||||
|
mkdir -p tmp/woocommerce
|
||||||
|
mkdir -p node_modules
|
||||||
|
|
||||||
- name: Create dirs.
|
- name: Checkout code.
|
||||||
run: |
|
uses: actions/checkout@v2
|
||||||
mkdir -p code/woocommerce
|
with:
|
||||||
mkdir -p package/woocommerce
|
path: package/woocommerce
|
||||||
mkdir -p tmp/woocommerce
|
ref: trunk
|
||||||
mkdir -p node_modules
|
|
||||||
|
|
||||||
- name: Checkout code.
|
- name: Install prerequisites.
|
||||||
uses: actions/checkout@v2
|
working-directory: package/woocommerce/plugins/woocommerce
|
||||||
with:
|
run: |
|
||||||
path: package/woocommerce
|
npm install -g pnpm
|
||||||
ref: trunk
|
pnpm install
|
||||||
|
pnpm nx composer-install-no-dev woocommerce
|
||||||
|
pnpm nx build-assets woocommerce
|
||||||
|
pnpm install jest
|
||||||
|
|
||||||
- name: Install prerequisites.
|
- name: Run smoke test.
|
||||||
working-directory: package/woocommerce/plugins/woocommerce
|
working-directory: package/woocommerce/plugins/woocommerce
|
||||||
run: |
|
env:
|
||||||
npm install -g pnpm
|
SMOKE_TEST_URL: ${{ secrets.SMOKE_TEST_URL }}
|
||||||
pnpm install
|
SMOKE_TEST_ADMIN_USER: ${{ secrets.SMOKE_TEST_ADMIN_USER }}
|
||||||
pnpm nx composer-install-no-dev woocommerce
|
SMOKE_TEST_ADMIN_PASSWORD: ${{ secrets.SMOKE_TEST_ADMIN_PASSWORD }}
|
||||||
pnpm nx build-assets woocommerce
|
SMOKE_TEST_ADMIN_USER_EMAIL: ${{ secrets.SMOKE_TEST_ADMIN_USER_EMAIL }}
|
||||||
pnpm install jest
|
SMOKE_TEST_CUSTOMER_USER: ${{ secrets.SMOKE_TEST_CUSTOMER_USER }}
|
||||||
|
SMOKE_TEST_CUSTOMER_PASSWORD: ${{ secrets.SMOKE_TEST_CUSTOMER_PASSWORD }}
|
||||||
|
WC_E2E_SCREENSHOTS: 1
|
||||||
|
E2E_RETEST: 1
|
||||||
|
E2E_SLACK_TOKEN: ${{ secrets.SMOKE_TEST_SLACK_TOKEN }}
|
||||||
|
E2E_SLACK_CHANNEL: ${{ secrets.SMOKE_TEST_SLACK_CHANNEL }}
|
||||||
|
UPDATE_WC: 1
|
||||||
|
DEFAULT_TIMEOUT_OVERRIDE: 120000
|
||||||
|
BASE_URL: ${{ secrets.SMOKE_TEST_URL }}
|
||||||
|
USER_KEY: ${{ secrets.SMOKE_TEST_ADMIN_USER }}
|
||||||
|
USER_SECRET: ${{ secrets.SMOKE_TEST_ADMIN_PASSWORD }}
|
||||||
|
run: |
|
||||||
|
pnpm exec wc-e2e test:e2e tests/e2e/specs/smoke-tests/update-woocommerce.js
|
||||||
|
pnpm exec wc-e2e test:e2e
|
||||||
|
pnpm exec wc-api-tests test api
|
||||||
|
|
||||||
- name: Run smoke test.
|
build:
|
||||||
working-directory: package/woocommerce/plugins/woocommerce
|
name: Build zip for PR
|
||||||
env:
|
runs-on: ubuntu-latest
|
||||||
SMOKE_TEST_URL: ${{ secrets.SMOKE_TEST_URL }}
|
steps:
|
||||||
SMOKE_TEST_ADMIN_USER: ${{ secrets.SMOKE_TEST_ADMIN_USER }}
|
- name: Checkout code
|
||||||
SMOKE_TEST_ADMIN_PASSWORD: ${{ secrets.SMOKE_TEST_ADMIN_PASSWORD }}
|
uses: actions/checkout@v2
|
||||||
SMOKE_TEST_ADMIN_USER_EMAIL: ${{ secrets.SMOKE_TEST_ADMIN_USER_EMAIL }}
|
|
||||||
SMOKE_TEST_CUSTOMER_USER: ${{ secrets.SMOKE_TEST_CUSTOMER_USER }}
|
|
||||||
SMOKE_TEST_CUSTOMER_PASSWORD: ${{ secrets.SMOKE_TEST_CUSTOMER_PASSWORD }}
|
|
||||||
WC_E2E_SCREENSHOTS: 1
|
|
||||||
E2E_RETEST: 1
|
|
||||||
E2E_SLACK_TOKEN: ${{ secrets.SMOKE_TEST_SLACK_TOKEN }}
|
|
||||||
E2E_SLACK_CHANNEL: ${{ secrets.SMOKE_TEST_SLACK_CHANNEL }}
|
|
||||||
UPDATE_WC: 1
|
|
||||||
DEFAULT_TIMEOUT_OVERRIDE: 120000
|
|
||||||
BASE_URL: ${{ secrets.SMOKE_TEST_URL }}
|
|
||||||
USER_KEY: ${{ secrets.SMOKE_TEST_ADMIN_USER }}
|
|
||||||
USER_SECRET: ${{ secrets.SMOKE_TEST_ADMIN_PASSWORD }}
|
|
||||||
run: |
|
|
||||||
pnpx wc-e2e test:e2e tests/e2e/specs/smoke-tests/update-woocommerce.js
|
|
||||||
pnpx wc-e2e test:e2e
|
|
||||||
pnpx wc-api-tests test api
|
|
||||||
|
|
||||||
build:
|
- name: Build
|
||||||
name: Build zip for PR
|
id: build
|
||||||
runs-on: ubuntu-latest
|
uses: woocommerce/action-build@trunk
|
||||||
steps:
|
env:
|
||||||
- name: Checkout code
|
BUILD_ENV: e2e
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Build
|
- name: Upload PR zip
|
||||||
id: build
|
uses: actions/upload-artifact@v2
|
||||||
uses: woocommerce/action-build@trunk
|
env:
|
||||||
env:
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
BUILD_ENV: e2e
|
with:
|
||||||
|
name: woocommerce
|
||||||
|
path: ${{ steps.build.outputs.zip_path }}
|
||||||
|
retention-days: 7
|
||||||
|
|
||||||
- name: Upload PR zip
|
test-plugins:
|
||||||
uses: actions/upload-artifact@v2
|
name: Smoke tests with ${{ matrix.plugin }} plugin installed
|
||||||
env:
|
runs-on: ubuntu-18.04
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
needs: [build]
|
||||||
with:
|
strategy:
|
||||||
name: woocommerce
|
fail-fast: false
|
||||||
path: ${{ steps.build.outputs.zip_path }}
|
matrix:
|
||||||
retention-days: 7
|
include:
|
||||||
|
- plugin: 'WooCommerce Payments'
|
||||||
|
repo: 'automattic/woocommerce-payments'
|
||||||
|
- plugin: 'WooCommerce PayPal Payments'
|
||||||
|
repo: 'woocommerce/woocommerce-paypal-payments'
|
||||||
|
- plugin: 'WooCommerce Shipping & Tax'
|
||||||
|
repo: 'automattic/woocommerce-services'
|
||||||
|
- plugin: 'WooCommerce Subscriptions'
|
||||||
|
repo: WC_SUBSCRIPTIONS_REPO
|
||||||
|
private: true
|
||||||
|
- plugin: 'WordPress SEO' # Yoast SEO in the UI, but the slug is wordpress-seo
|
||||||
|
repo: 'Yoast/wordpress-seo'
|
||||||
|
- plugin: 'Contact Form 7'
|
||||||
|
repo: 'takayukister/contact-form-7'
|
||||||
|
steps:
|
||||||
|
- name: Create dirs.
|
||||||
|
run: |
|
||||||
|
mkdir -p code/woocommerce
|
||||||
|
mkdir -p package/woocommerce
|
||||||
|
mkdir -p tmp/woocommerce
|
||||||
|
mkdir -p node_modules
|
||||||
|
|
||||||
test-plugins:
|
- name: Checkout code.
|
||||||
name: Smoke tests with ${{ matrix.plugin }} plugin installed
|
uses: actions/checkout@v2
|
||||||
runs-on: ubuntu-18.04
|
with:
|
||||||
needs: [build]
|
path: package/woocommerce
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- plugin: 'WooCommerce Payments'
|
|
||||||
repo: 'automattic/woocommerce-payments'
|
|
||||||
- plugin: 'WooCommerce PayPal Payments'
|
|
||||||
repo: 'woocommerce/woocommerce-paypal-payments'
|
|
||||||
- plugin: 'WooCommerce Shipping & Tax'
|
|
||||||
repo: 'automattic/woocommerce-services'
|
|
||||||
- plugin: 'WooCommerce Subscriptions'
|
|
||||||
repo: WC_SUBSCRIPTIONS_REPO
|
|
||||||
private: true
|
|
||||||
- plugin: 'WordPress SEO' # Yoast SEO in the UI, but the slug is wordpress-seo
|
|
||||||
repo: 'Yoast/wordpress-seo'
|
|
||||||
- plugin: 'Contact Form 7'
|
|
||||||
repo: 'takayukister/contact-form-7'
|
|
||||||
steps:
|
|
||||||
- name: Create dirs.
|
|
||||||
run: |
|
|
||||||
mkdir -p code/woocommerce
|
|
||||||
mkdir -p package/woocommerce
|
|
||||||
mkdir -p tmp/woocommerce
|
|
||||||
mkdir -p node_modules
|
|
||||||
|
|
||||||
- name: Checkout code.
|
- name: Install PNPM and install dependencies
|
||||||
uses: actions/checkout@v2
|
working-directory: package/woocommerce
|
||||||
with:
|
run: |
|
||||||
path: package/woocommerce
|
npm install -g pnpm
|
||||||
|
pnpm install
|
||||||
|
|
||||||
- name: Install PNPM and install dependencies
|
- name: Load docker images and start containers.
|
||||||
working-directory: package/woocommerce
|
working-directory: package/woocommerce/plugins/woocommerce
|
||||||
run: |
|
run: pnpm exec wc-e2e docker:up
|
||||||
npm install -g pnpm
|
|
||||||
pnpm install
|
|
||||||
|
|
||||||
- name: Load docker images and start containers.
|
- name: Move current directory to code. We will install zip file in this dir later.
|
||||||
working-directory: package/woocommerce/plugins/woocommerce
|
run: mv ./package/woocommerce/plugins/woocommerce/* ./code/woocommerce
|
||||||
run: pnpx wc-e2e docker:up
|
|
||||||
|
|
||||||
- name: Move current directory to code. We will install zip file in this dir later.
|
- name: Download WooCommerce ZIP.
|
||||||
run: mv ./package/woocommerce/plugins/woocommerce/* ./code/woocommerce
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: woocommerce
|
||||||
|
path: tmp
|
||||||
|
|
||||||
- name: Download WooCommerce ZIP.
|
- name: Extract and replace WooCommerce zip.
|
||||||
uses: actions/download-artifact@v2
|
working-directory: tmp
|
||||||
with:
|
run: |
|
||||||
name: woocommerce
|
unzip woocommerce.zip -d woocommerce
|
||||||
path: tmp
|
mv woocommerce/woocommerce/* ../package/woocommerce/plugins/woocommerce/
|
||||||
|
|
||||||
- name: Extract and replace WooCommerce zip.
|
- name: Install dependencies again
|
||||||
working-directory: tmp
|
working-directory: package/woocommerce
|
||||||
run: |
|
run: |
|
||||||
unzip woocommerce.zip -d woocommerce
|
npm install -g pnpm
|
||||||
mv woocommerce/woocommerce/* ../package/woocommerce/plugins/woocommerce/
|
pnpm install
|
||||||
|
|
||||||
- name: Install dependencies again
|
- name: Run tests command.
|
||||||
working-directory: package/woocommerce
|
working-directory: package/woocommerce/plugins/woocommerce
|
||||||
run: |
|
env:
|
||||||
npm install -g pnpm
|
WC_E2E_SCREENSHOTS: 1
|
||||||
pnpm install
|
E2E_SLACK_TOKEN: ${{ secrets.SMOKE_TEST_SLACK_TOKEN }}
|
||||||
|
E2E_SLACK_CHANNEL: ${{ secrets.RELEASE_TEST_SLACK_CHANNEL }}
|
||||||
- name: Run tests command.
|
PLUGIN_REPOSITORY: ${{ matrix.private && secrets[matrix.repo] || matrix.repo }}
|
||||||
working-directory: package/woocommerce/plugins/woocommerce
|
PLUGIN_NAME: ${{ matrix.plugin }}
|
||||||
env:
|
GITHUB_TOKEN: ${{ secrets.E2E_GH_TOKEN }}
|
||||||
WC_E2E_SCREENSHOTS: 1
|
run: |
|
||||||
E2E_SLACK_TOKEN: ${{ secrets.SMOKE_TEST_SLACK_TOKEN }}
|
pnpm exec wc-e2e test:e2e tests/e2e/specs/smoke-tests/upload-plugin.js
|
||||||
E2E_SLACK_CHANNEL: ${{ secrets.RELEASE_TEST_SLACK_CHANNEL }}
|
pnpm exec wc-e2e test:e2e
|
||||||
PLUGIN_REPOSITORY: ${{ matrix.private && secrets[matrix.repo] || matrix.repo }}
|
|
||||||
PLUGIN_NAME: ${{ matrix.plugin }}
|
|
||||||
GITHUB_TOKEN: ${{ secrets.E2E_GH_TOKEN }}
|
|
||||||
run: |
|
|
||||||
pnpx wc-e2e test:e2e tests/e2e/specs/smoke-tests/upload-plugin.js
|
|
||||||
pnpx wc-e2e test:e2e
|
|
||||||
|
|
|
@ -1,199 +1,197 @@
|
||||||
name: Smoke test release
|
name: Smoke test release
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
release_id:
|
release_id:
|
||||||
description: 'WooCommerce Release Id'
|
description: 'WooCommerce Release Id'
|
||||||
required: true
|
required: true
|
||||||
jobs:
|
jobs:
|
||||||
login-run:
|
login-run:
|
||||||
name: Daily smoke test on release.
|
name: Daily smoke test on release.
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
steps:
|
steps:
|
||||||
|
- name: Create dirs.
|
||||||
|
run: |
|
||||||
|
mkdir -p code/woocommerce
|
||||||
|
mkdir -p package/woocommerce
|
||||||
|
mkdir -p tmp/woocommerce
|
||||||
|
mkdir -p node_modules
|
||||||
|
|
||||||
- name: Create dirs.
|
- name: Checkout code.
|
||||||
run: |
|
uses: actions/checkout@v2
|
||||||
mkdir -p code/woocommerce
|
with:
|
||||||
mkdir -p package/woocommerce
|
path: package/woocommerce
|
||||||
mkdir -p tmp/woocommerce
|
ref: trunk
|
||||||
mkdir -p node_modules
|
|
||||||
|
|
||||||
- name: Checkout code.
|
- name: Install prerequisites.
|
||||||
uses: actions/checkout@v2
|
working-directory: package/woocommerce/plugins/woocommerce
|
||||||
with:
|
run: |
|
||||||
path: package/woocommerce
|
npm install -g pnpm
|
||||||
ref: trunk
|
pnpm install
|
||||||
|
pnpm nx composer-install-no-dev woocommerce
|
||||||
|
pnpm nx build-assets woocommerce
|
||||||
|
pnpm install jest
|
||||||
|
|
||||||
- name: Install prerequisites.
|
- name: Run smoke test.
|
||||||
working-directory: package/woocommerce/plugins/woocommerce
|
working-directory: package/woocommerce/plugins/woocommerce
|
||||||
run: |
|
env:
|
||||||
npm install -g pnpm
|
SMOKE_TEST_URL: ${{ secrets.RELEASE_TEST_URL }}
|
||||||
pnpm install
|
SMOKE_TEST_ADMIN_USER: ${{ secrets.RELEASE_TEST_ADMIN_USER }}
|
||||||
pnpm nx composer-install-no-dev woocommerce
|
SMOKE_TEST_ADMIN_PASSWORD: ${{ secrets.RELEASE_TEST_ADMIN_PASSWORD }}
|
||||||
pnpm nx build-assets woocommerce
|
SMOKE_TEST_ADMIN_USER_EMAIL: ${{ secrets.RELEASE_TEST_ADMIN_USER_EMAIL }}
|
||||||
pnpm install jest
|
SMOKE_TEST_CUSTOMER_USER: ${{ secrets.RELEASE_TEST_CUSTOMER_USER }}
|
||||||
|
SMOKE_TEST_CUSTOMER_PASSWORD: ${{ secrets.RELEASE_TEST_CUSTOMER_PASSWORD }}
|
||||||
|
WC_E2E_SCREENSHOTS: 1
|
||||||
|
E2E_RETEST: 1
|
||||||
|
E2E_SLACK_TOKEN: ${{ secrets.SMOKE_TEST_SLACK_TOKEN }}
|
||||||
|
E2E_SLACK_CHANNEL: ${{ secrets.RELEASE_TEST_SLACK_CHANNEL }}
|
||||||
|
TEST_RELEASE: 1
|
||||||
|
UPDATE_WC: 1
|
||||||
|
DEFAULT_TIMEOUT_OVERRIDE: 120000
|
||||||
|
BASE_URL: ${{ secrets.RELEASE_TEST_URL }}
|
||||||
|
USER_KEY: ${{ secrets.RELEASE_TEST_ADMIN_USER }}
|
||||||
|
USER_SECRET: ${{ secrets.RELEASE_TEST_ADMIN_PASSWORD }}
|
||||||
|
run: |
|
||||||
|
pnpm exec wc-e2e test:e2e tests/e2e/specs/smoke-tests/update-woocommerce.js
|
||||||
|
pnpm exec wc-e2e test:e2e
|
||||||
|
pnpm exec wc-api-tests test api
|
||||||
|
test-wp-version:
|
||||||
|
name: Smoke test on L-${{ matrix.wp }} WordPress version
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
wp: ['1', '2']
|
||||||
|
steps:
|
||||||
|
- name: Create dirs.
|
||||||
|
run: |
|
||||||
|
mkdir -p code/woocommerce
|
||||||
|
mkdir -p package/woocommerce
|
||||||
|
mkdir -p tmp/woocommerce
|
||||||
|
mkdir -p node_modules
|
||||||
|
|
||||||
- name: Run smoke test.
|
- name: Checkout code.
|
||||||
working-directory: package/woocommerce/plugins/woocommerce
|
uses: actions/checkout@v2
|
||||||
env:
|
with:
|
||||||
SMOKE_TEST_URL: ${{ secrets.RELEASE_TEST_URL }}
|
path: package/woocommerce
|
||||||
SMOKE_TEST_ADMIN_USER: ${{ secrets.RELEASE_TEST_ADMIN_USER }}
|
- name: Fetch Asset ID
|
||||||
SMOKE_TEST_ADMIN_PASSWORD: ${{ secrets.RELEASE_TEST_ADMIN_PASSWORD }}
|
id: fetch_asset_id
|
||||||
SMOKE_TEST_ADMIN_USER_EMAIL: ${{ secrets.RELEASE_TEST_ADMIN_USER_EMAIL }}
|
uses: actions/github-script@v5
|
||||||
SMOKE_TEST_CUSTOMER_USER: ${{ secrets.RELEASE_TEST_CUSTOMER_USER }}
|
env:
|
||||||
SMOKE_TEST_CUSTOMER_PASSWORD: ${{ secrets.RELEASE_TEST_CUSTOMER_PASSWORD }}
|
RELEASE_ID: ${{ github.event.inputs.release_id }}
|
||||||
WC_E2E_SCREENSHOTS: 1
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
E2E_RETEST: 1
|
REPO: ${{ github.repository }}
|
||||||
E2E_SLACK_TOKEN: ${{ secrets.SMOKE_TEST_SLACK_TOKEN }}
|
with:
|
||||||
E2E_SLACK_CHANNEL: ${{ secrets.RELEASE_TEST_SLACK_CHANNEL }}
|
script: |
|
||||||
TEST_RELEASE: 1
|
const script = require( './package/woocommerce/.github/workflows/scripts/fetch-asset-id.js' )
|
||||||
UPDATE_WC: 1
|
await script({github, context, core})
|
||||||
DEFAULT_TIMEOUT_OVERRIDE: 120000
|
|
||||||
BASE_URL: ${{ secrets.RELEASE_TEST_URL }}
|
|
||||||
USER_KEY: ${{ secrets.RELEASE_TEST_ADMIN_USER }}
|
|
||||||
USER_SECRET: ${{ secrets.RELEASE_TEST_ADMIN_PASSWORD }}
|
|
||||||
run: |
|
|
||||||
pnpx wc-e2e test:e2e tests/e2e/specs/smoke-tests/update-woocommerce.js
|
|
||||||
pnpx wc-e2e test:e2e
|
|
||||||
pnpx wc-api-tests test api
|
|
||||||
test-wp-version:
|
|
||||||
name: Smoke test on L-${{ matrix.wp }} WordPress version
|
|
||||||
runs-on: ubuntu-18.04
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
wp: [ '1', '2' ]
|
|
||||||
steps:
|
|
||||||
|
|
||||||
- name: Create dirs.
|
- name: Install PNPM and install dependencies
|
||||||
run: |
|
working-directory: package/woocommerce
|
||||||
mkdir -p code/woocommerce
|
run: |
|
||||||
mkdir -p package/woocommerce
|
npm install -g pnpm
|
||||||
mkdir -p tmp/woocommerce
|
pnpm install
|
||||||
mkdir -p node_modules
|
|
||||||
|
|
||||||
- name: Checkout code.
|
- name: Load docker images and start containers.
|
||||||
uses: actions/checkout@v2
|
working-directory: package/woocommerce/plugins/woocommerce
|
||||||
with:
|
env:
|
||||||
path: package/woocommerce
|
LATEST_WP_VERSION_MINUS: ${{ matrix.wp }}
|
||||||
- name: Fetch Asset ID
|
run: pnpm nx docker-up woocommerce
|
||||||
id: fetch_asset_id
|
|
||||||
uses: actions/github-script@v5
|
|
||||||
env:
|
|
||||||
RELEASE_ID: ${{ github.event.inputs.release_id }}
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
REPO: ${{ github.repository }}
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const script = require( './package/woocommerce/.github/workflows/scripts/fetch-asset-id.js' )
|
|
||||||
await script({github, context, core})
|
|
||||||
|
|
||||||
- name: Install PNPM and install dependencies
|
- name: Move current directory to code. We will install zip file in this dir later.
|
||||||
working-directory: package/woocommerce
|
run: mv ./package/woocommerce/plugins/woocommerce/* ./code/woocommerce
|
||||||
run: |
|
|
||||||
npm install -g pnpm
|
|
||||||
pnpm install
|
|
||||||
|
|
||||||
- name: Load docker images and start containers.
|
- name: Download WooCommerce release zip
|
||||||
working-directory: package/woocommerce/plugins/woocommerce
|
working-directory: tmp
|
||||||
env:
|
run: |
|
||||||
LATEST_WP_VERSION_MINUS: ${{ matrix.wp }}
|
curl https://api.github.com/repos/${{ github.repository }}/releases/assets/${{ steps.fetch_asset_id.outputs.asset_id }} -LJOH 'Accept: application/octet-stream'
|
||||||
run: pnpm nx docker-up woocommerce
|
|
||||||
|
|
||||||
- name: Move current directory to code. We will install zip file in this dir later.
|
unzip woocommerce.zip -d woocommerce
|
||||||
run: mv ./package/woocommerce/plugins/woocommerce/* ./code/woocommerce
|
mv woocommerce/woocommerce/* ../package/woocommerce/plugins/woocommerce/
|
||||||
|
|
||||||
- name: Download WooCommerce release zip
|
- name: Run tests command.
|
||||||
working-directory: tmp
|
working-directory: package/woocommerce/plugins/woocommerce
|
||||||
run: |
|
env:
|
||||||
curl https://api.github.com/repos/${{ github.repository }}/releases/assets/${{ steps.fetch_asset_id.outputs.asset_id }} -LJOH 'Accept: application/octet-stream'
|
WC_E2E_SCREENSHOTS: 1
|
||||||
|
E2E_SLACK_TOKEN: ${{ secrets.SMOKE_TEST_SLACK_TOKEN }}
|
||||||
|
E2E_SLACK_CHANNEL: ${{ secrets.RELEASE_TEST_SLACK_CHANNEL }}
|
||||||
|
run: pnpm nx test-e2e woocommerce
|
||||||
|
|
||||||
unzip woocommerce.zip -d woocommerce
|
test-plugins:
|
||||||
mv woocommerce/woocommerce/* ../package/woocommerce/plugins/woocommerce/
|
name: Smoke tests with ${{ matrix.plugin }} plugin installed
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- plugin: 'WooCommerce Payments'
|
||||||
|
repo: 'automattic/woocommerce-payments'
|
||||||
|
- plugin: 'WooCommerce PayPal Payments'
|
||||||
|
repo: 'woocommerce/woocommerce-paypal-payments'
|
||||||
|
- plugin: 'WooCommerce Shipping & Tax'
|
||||||
|
repo: 'automattic/woocommerce-services'
|
||||||
|
- plugin: 'WooCommerce Subscriptions'
|
||||||
|
repo: WC_SUBSCRIPTIONS_REPO
|
||||||
|
private: true
|
||||||
|
- plugin: 'WordPress SEO' # Yoast SEO in the UI, but the slug is wordpress-seo
|
||||||
|
repo: 'Yoast/wordpress-seo'
|
||||||
|
- plugin: 'Contact Form 7'
|
||||||
|
repo: 'takayukister/contact-form-7'
|
||||||
|
steps:
|
||||||
|
- name: Create dirs.
|
||||||
|
run: |
|
||||||
|
mkdir -p code/woocommerce
|
||||||
|
mkdir -p package/woocommerce
|
||||||
|
mkdir -p tmp/woocommerce
|
||||||
|
mkdir -p node_modules
|
||||||
|
|
||||||
- name: Run tests command.
|
- name: Checkout code.
|
||||||
working-directory: package/woocommerce/plugins/woocommerce
|
uses: actions/checkout@v2
|
||||||
env:
|
with:
|
||||||
WC_E2E_SCREENSHOTS: 1
|
path: package/woocommerce
|
||||||
E2E_SLACK_TOKEN: ${{ secrets.SMOKE_TEST_SLACK_TOKEN }}
|
- name: Fetch Asset ID
|
||||||
E2E_SLACK_CHANNEL: ${{ secrets.RELEASE_TEST_SLACK_CHANNEL }}
|
id: fetch_asset_id
|
||||||
run: pnpm nx test-e2e woocommerce
|
uses: actions/github-script@v5
|
||||||
|
env:
|
||||||
|
RELEASE_ID: ${{ github.event.inputs.release_id }}
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
REPO: ${{ github.repository }}
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const script = require( './package/woocommerce/.github/workflows/scripts/fetch-asset-id.js' )
|
||||||
|
await script({github, context, core})
|
||||||
|
|
||||||
test-plugins:
|
- name: Install PNPM and install dependencies
|
||||||
name: Smoke tests with ${{ matrix.plugin }} plugin installed
|
working-directory: package/woocommerce
|
||||||
runs-on: ubuntu-18.04
|
run: |
|
||||||
strategy:
|
npm install -g pnpm
|
||||||
fail-fast: false
|
pnpm install
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- plugin: 'WooCommerce Payments'
|
|
||||||
repo: 'automattic/woocommerce-payments'
|
|
||||||
- plugin: 'WooCommerce PayPal Payments'
|
|
||||||
repo: 'woocommerce/woocommerce-paypal-payments'
|
|
||||||
- plugin: 'WooCommerce Shipping & Tax'
|
|
||||||
repo: 'automattic/woocommerce-services'
|
|
||||||
- plugin: 'WooCommerce Subscriptions'
|
|
||||||
repo: WC_SUBSCRIPTIONS_REPO
|
|
||||||
private: true
|
|
||||||
- plugin: 'WordPress SEO' # Yoast SEO in the UI, but the slug is wordpress-seo
|
|
||||||
repo: 'Yoast/wordpress-seo'
|
|
||||||
- plugin: 'Contact Form 7'
|
|
||||||
repo: 'takayukister/contact-form-7'
|
|
||||||
steps:
|
|
||||||
- name: Create dirs.
|
|
||||||
run: |
|
|
||||||
mkdir -p code/woocommerce
|
|
||||||
mkdir -p package/woocommerce
|
|
||||||
mkdir -p tmp/woocommerce
|
|
||||||
mkdir -p node_modules
|
|
||||||
|
|
||||||
- name: Checkout code.
|
- name: Load docker images and start containers.
|
||||||
uses: actions/checkout@v2
|
working-directory: package/woocommerce/plugins/woocommerce
|
||||||
with:
|
env:
|
||||||
path: package/woocommerce
|
LATEST_WP_VERSION_MINUS: ${{ matrix.wp }}
|
||||||
- name: Fetch Asset ID
|
run: pnpm nx docker-up woocommerce
|
||||||
id: fetch_asset_id
|
|
||||||
uses: actions/github-script@v5
|
|
||||||
env:
|
|
||||||
RELEASE_ID: ${{ github.event.inputs.release_id }}
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
REPO: ${{ github.repository }}
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const script = require( './package/woocommerce/.github/workflows/scripts/fetch-asset-id.js' )
|
|
||||||
await script({github, context, core})
|
|
||||||
|
|
||||||
- name: Install PNPM and install dependencies
|
- name: Move current directory to code. We will install zip file in this dir later.
|
||||||
working-directory: package/woocommerce
|
run: mv ./package/woocommerce/plugins/woocommerce/* ./code/woocommerce
|
||||||
run: |
|
|
||||||
npm install -g pnpm
|
|
||||||
pnpm install
|
|
||||||
|
|
||||||
- name: Load docker images and start containers.
|
- name: Download WooCommerce release zip
|
||||||
working-directory: package/woocommerce/plugins/woocommerce
|
working-directory: tmp
|
||||||
env:
|
run: |
|
||||||
LATEST_WP_VERSION_MINUS: ${{ matrix.wp }}
|
curl https://api.github.com/repos/${{ github.repository }}/releases/assets/${{ steps.fetch_asset_id.outputs.asset_id }} -LJOH 'Accept: application/octet-stream'
|
||||||
run: pnpm nx docker-up woocommerce
|
|
||||||
|
|
||||||
- name: Move current directory to code. We will install zip file in this dir later.
|
unzip woocommerce.zip -d woocommerce
|
||||||
run: mv ./package/woocommerce/plugins/woocommerce/* ./code/woocommerce
|
mv woocommerce/woocommerce/* ../package/woocommerce/plugins/woocommerce/
|
||||||
|
|
||||||
- name: Download WooCommerce release zip
|
- name: Run tests command.
|
||||||
working-directory: tmp
|
working-directory: package/woocommerce/plugins/woocommerce
|
||||||
run: |
|
env:
|
||||||
curl https://api.github.com/repos/${{ github.repository }}/releases/assets/${{ steps.fetch_asset_id.outputs.asset_id }} -LJOH 'Accept: application/octet-stream'
|
WC_E2E_SCREENSHOTS: 1
|
||||||
|
E2E_SLACK_TOKEN: ${{ secrets.SMOKE_TEST_SLACK_TOKEN }}
|
||||||
unzip woocommerce.zip -d woocommerce
|
E2E_SLACK_CHANNEL: ${{ secrets.RELEASE_TEST_SLACK_CHANNEL }}
|
||||||
mv woocommerce/woocommerce/* ../package/woocommerce/plugins/woocommerce/
|
PLUGIN_REPOSITORY: ${{ matrix.private && secrets[matrix.repo] || matrix.repo }}
|
||||||
|
PLUGIN_NAME: ${{ matrix.plugin }}
|
||||||
- name: Run tests command.
|
GITHUB_TOKEN: ${{ secrets.E2E_GH_TOKEN }}
|
||||||
working-directory: package/woocommerce/plugins/woocommerce
|
run: |
|
||||||
env:
|
pnpm exec wc-e2e test:e2e tests/e2e/specs/smoke-tests/upload-plugin.js
|
||||||
WC_E2E_SCREENSHOTS: 1
|
pnpm exec wc-e2e test:e2e
|
||||||
E2E_SLACK_TOKEN: ${{ secrets.SMOKE_TEST_SLACK_TOKEN }}
|
|
||||||
E2E_SLACK_CHANNEL: ${{ secrets.RELEASE_TEST_SLACK_CHANNEL }}
|
|
||||||
PLUGIN_REPOSITORY: ${{ matrix.private && secrets[matrix.repo] || matrix.repo }}
|
|
||||||
PLUGIN_NAME: ${{ matrix.plugin }}
|
|
||||||
GITHUB_TOKEN: ${{ secrets.E2E_GH_TOKEN }}
|
|
||||||
run: |
|
|
||||||
pnpx wc-e2e test:e2e tests/e2e/specs/smoke-tests/upload-plugin.js
|
|
||||||
pnpx wc-e2e test:e2e
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ report() {
|
||||||
if [[ $REPORT_EXIT_CODE -eq 0 && $GITHUB_ACTIONS != "true" ]]; then
|
if [[ $REPORT_EXIT_CODE -eq 0 && $GITHUB_ACTIONS != "true" ]]; then
|
||||||
echo "To view the report on your browser, run:"
|
echo "To view the report on your browser, run:"
|
||||||
echo ""
|
echo ""
|
||||||
echo "pnpx allure open \"$ALLURE_REPORT_DIR\""
|
echo "pnpm dlx allure open \"$ALLURE_REPORT_DIR\""
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,7 +95,7 @@ The E2E environment has the following methods to let us control Jest's overall b
|
||||||
**NOTE:** The amount of times failed tests are retried can also be set using the `E2E_RETRY_TIMES` environment variable when executing tests. This can be done using the command below:
|
**NOTE:** The amount of times failed tests are retried can also be set using the `E2E_RETRY_TIMES` environment variable when executing tests. This can be done using the command below:
|
||||||
|
|
||||||
```
|
```
|
||||||
E2E_RETRY_TIMES=2 pnpx wc-e2e test:e2e
|
E2E_RETRY_TIMES=2 pnpm exec wc-e2e test:e2e
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Test Screenshots
|
#### Test Screenshots
|
||||||
|
|
|
@ -52,7 +52,7 @@ wp plugin install wp-mail-logging --activate
|
||||||
The container build script supports an initialization script parameter
|
The container build script supports an initialization script parameter
|
||||||
|
|
||||||
```shell script
|
```shell script
|
||||||
pnpx wc-e2e docker:up plugins/woocommerce/tests/e2e/docker/init-wp-beta.sh
|
pnpm exec wc-e2e docker:up plugins/woocommerce/tests/e2e/docker/init-wp-beta.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
This script updates WordPress to the latest nightly point release
|
This script updates WordPress to the latest nightly point release
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
"options": {
|
"options": {
|
||||||
"commands": [
|
"commands": [
|
||||||
{
|
{
|
||||||
"command": "pnpx grunt assets",
|
"command": "pnpm dlx grunt assets",
|
||||||
"forwardAllArgs": false
|
"forwardAllArgs": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -25,11 +25,11 @@
|
||||||
"options": {
|
"options": {
|
||||||
"commands": [
|
"commands": [
|
||||||
{
|
{
|
||||||
"command": "pnpx grunt eslint",
|
"command": "pnpm dlx grunt eslint",
|
||||||
"forwardAllArgs": false
|
"forwardAllArgs": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "pnpx grunt stylelint",
|
"command": "pnpm dlx grunt stylelint",
|
||||||
"forwardAllArgs": false
|
"forwardAllArgs": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
|
@ -1,110 +1,110 @@
|
||||||
{
|
{
|
||||||
"name": "woocommerce",
|
"name": "woocommerce",
|
||||||
"title": "WooCommerce",
|
"title": "WooCommerce",
|
||||||
"version": "6.4.0",
|
"version": "6.4.0",
|
||||||
"homepage": "https://woocommerce.com/",
|
"homepage": "https://woocommerce.com/",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/woocommerce/woocommerce.git"
|
"url": "https://github.com/woocommerce/woocommerce.git"
|
||||||
},
|
},
|
||||||
"license": "GPL-3.0+",
|
"license": "GPL-3.0+",
|
||||||
"config": {
|
"config": {
|
||||||
"wp_org_slug": "woocommerce"
|
"wp_org_slug": "woocommerce"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"preinstall": "npx only-allow pnpm",
|
"preinstall": "npx only-allow pnpm",
|
||||||
"build": "./bin/build-zip.sh",
|
"build": "./bin/build-zip.sh",
|
||||||
"build:feature-config": "php bin/generate-feature-config.php",
|
"build:feature-config": "php bin/generate-feature-config.php",
|
||||||
"build:core": "pnpm run build:feature-config && pnpm nx build woocommerce-admin && pnpm nx build woocommerce-legacy-assets && pnpm run makepot",
|
"build:core": "pnpm run build:feature-config && pnpm nx build woocommerce-admin && pnpm nx build woocommerce-legacy-assets && pnpm run makepot",
|
||||||
"build:zip": "pnpm run build",
|
"build:zip": "pnpm run build",
|
||||||
"lint:js": "eslint assets/js --ext=js",
|
"lint:js": "eslint assets/js --ext=js",
|
||||||
"docker:down": "pnpx wc-e2e docker:down",
|
"docker:down": "pnpm exec wc-e2e docker:down",
|
||||||
"docker:ssh": "pnpx wc-e2e docker:ssh",
|
"docker:ssh": "pnpm exec wc-e2e docker:ssh",
|
||||||
"docker:up": "pnpx wc-e2e docker:up",
|
"docker:up": "pnpm exec wc-e2e docker:up",
|
||||||
"test:api": "ALLURE_OUTPUT_DIR=\"$PWD/tests/api\" pnpx wc-api-tests test api",
|
"test:api": "ALLURE_OUTPUT_DIR=\"$PWD/tests/api\" pnpm exec wc-api-tests test api",
|
||||||
"make:collection": "pnpx wc-api-tests make:collection",
|
"make:collection": "pnpm exec wc-api-tests make:collection",
|
||||||
"test:e2e": "pnpx wc-e2e test:e2e",
|
"test:e2e": "pnpm exec wc-e2e test:e2e",
|
||||||
"test:e2e-debug": "pnpx wc-e2e test:e2e-debug",
|
"test:e2e-debug": "pnpm exec wc-e2e test:e2e-debug",
|
||||||
"test:e2e-dev": "pnpx wc-e2e test:e2e-dev",
|
"test:e2e-dev": "pnpm exec wc-e2e test:e2e-dev",
|
||||||
"test:unit": "./vendor/bin/phpunit -c ./phpunit.xml",
|
"test:unit": "./vendor/bin/phpunit -c ./phpunit.xml",
|
||||||
"makepot": "composer run-script makepot",
|
"makepot": "composer run-script makepot",
|
||||||
"packages:fix:textdomain": "node ./bin/package-update-textdomain.js",
|
"packages:fix:textdomain": "node ./bin/package-update-textdomain.js",
|
||||||
"git:update-hooks": "rm -r .git/hooks && mkdir -p .git/hooks && node ./node_modules/husky/husky.js install"
|
"git:update-hooks": "rm -r .git/hooks && mkdir -p .git/hooks && node ./node_modules/husky/husky.js install"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/cli": "7.12.8",
|
"@babel/cli": "7.12.8",
|
||||||
"@babel/core": "7.12.9",
|
"@babel/core": "7.12.9",
|
||||||
"@babel/preset-env": "7.12.7",
|
"@babel/preset-env": "7.12.7",
|
||||||
"@babel/register": "7.12.1",
|
"@babel/register": "7.12.1",
|
||||||
"@typescript-eslint/eslint-plugin": "3.10.1",
|
"@typescript-eslint/eslint-plugin": "3.10.1",
|
||||||
"@typescript-eslint/experimental-utils": "3.10.1",
|
"@typescript-eslint/experimental-utils": "3.10.1",
|
||||||
"@typescript-eslint/parser": "3.10.1",
|
"@typescript-eslint/parser": "3.10.1",
|
||||||
"@woocommerce/admin-e2e-tests": "workspace:*",
|
"@woocommerce/admin-e2e-tests": "workspace:*",
|
||||||
"@woocommerce/api": "workspace:*",
|
"@woocommerce/api": "workspace:*",
|
||||||
"@woocommerce/api-core-tests": "workspace:*",
|
"@woocommerce/api-core-tests": "workspace:*",
|
||||||
"@woocommerce/e2e-core-tests": "workspace:*",
|
"@woocommerce/e2e-core-tests": "workspace:*",
|
||||||
"@woocommerce/e2e-environment": "workspace:*",
|
"@woocommerce/e2e-environment": "workspace:*",
|
||||||
"@woocommerce/e2e-utils": "workspace:*",
|
"@woocommerce/e2e-utils": "workspace:*",
|
||||||
"@wordpress/babel-plugin-import-jsx-pragma": "1.1.3",
|
"@wordpress/babel-plugin-import-jsx-pragma": "1.1.3",
|
||||||
"@wordpress/babel-preset-default": "3.0.2",
|
"@wordpress/babel-preset-default": "3.0.2",
|
||||||
"@wordpress/eslint-plugin": "7.3.0",
|
"@wordpress/eslint-plugin": "7.3.0",
|
||||||
"@wordpress/stylelint-config": "19.1.0",
|
"@wordpress/stylelint-config": "19.1.0",
|
||||||
"allure-commandline": "^2.17.2",
|
"allure-commandline": "^2.17.2",
|
||||||
"autoprefixer": "9.8.6",
|
"autoprefixer": "9.8.6",
|
||||||
"babel-eslint": "10.1.0",
|
"babel-eslint": "10.1.0",
|
||||||
"chai": "4.2.0",
|
"chai": "4.2.0",
|
||||||
"chai-as-promised": "7.1.1",
|
"chai-as-promised": "7.1.1",
|
||||||
"config": "3.3.3",
|
"config": "3.3.3",
|
||||||
"cross-env": "6.0.3",
|
"cross-env": "6.0.3",
|
||||||
"deasync": "0.1.21",
|
"deasync": "0.1.21",
|
||||||
"eslint": "6.8.0",
|
"eslint": "6.8.0",
|
||||||
"eslint-config-wpcalypso": "5.0.0",
|
"eslint-config-wpcalypso": "5.0.0",
|
||||||
"eslint-plugin-jest": "23.20.0",
|
"eslint-plugin-jest": "23.20.0",
|
||||||
"github-contributors-list": "https://github.com/woocommerce/github-contributors-list/tarball/master",
|
"github-contributors-list": "https://github.com/woocommerce/github-contributors-list/tarball/master",
|
||||||
"husky": "4.3.0",
|
"husky": "4.3.0",
|
||||||
"istanbul": "1.0.0-alpha.2",
|
"istanbul": "1.0.0-alpha.2",
|
||||||
"jest": "^25.1.0",
|
"jest": "^25.1.0",
|
||||||
"lint-staged": "9.5.0",
|
"lint-staged": "9.5.0",
|
||||||
"mocha": "7.2.0",
|
"mocha": "7.2.0",
|
||||||
"prettier": "npm:wp-prettier@2.0.5",
|
"prettier": "npm:wp-prettier@2.0.5",
|
||||||
"stylelint": "^13.8.0",
|
"stylelint": "^13.8.0",
|
||||||
"typescript": "3.9.7",
|
"typescript": "3.9.7",
|
||||||
"webpack": "4.44.2",
|
"webpack": "4.44.2",
|
||||||
"webpack-cli": "3.3.12",
|
"webpack-cli": "3.3.12",
|
||||||
"wp-textdomain": "1.0.1"
|
"wp-textdomain": "1.0.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^16.13.1",
|
"node": "^16.13.1",
|
||||||
"pnpm": "^6.24.2"
|
"pnpm": "^6.24.2"
|
||||||
},
|
},
|
||||||
"husky": {
|
"husky": {
|
||||||
"hooks": {
|
"hooks": {
|
||||||
"post-merge": "./bin/post-merge.sh",
|
"post-merge": "./bin/post-merge.sh",
|
||||||
"pre-commit": "lint-staged",
|
"pre-commit": "lint-staged",
|
||||||
"pre-push": "./bin/pre-push.sh"
|
"pre-push": "./bin/pre-push.sh"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.php": [
|
"*.php": [
|
||||||
"php -d display_errors=1 -l",
|
"php -d display_errors=1 -l",
|
||||||
"composer run-script phpcs-pre-commit"
|
"composer run-script phpcs-pre-commit"
|
||||||
],
|
],
|
||||||
"*.scss": [
|
"*.scss": [
|
||||||
"stylelint --syntax=scss --fix",
|
"stylelint --syntax=scss --fix",
|
||||||
"git add"
|
"git add"
|
||||||
],
|
],
|
||||||
"*.js": [
|
"*.js": [
|
||||||
"eslint --fix",
|
"eslint --fix",
|
||||||
"git add"
|
"git add"
|
||||||
],
|
],
|
||||||
"*.ts": [
|
"*.ts": [
|
||||||
"eslint --fix",
|
"eslint --fix",
|
||||||
"git add"
|
"git add"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
"> 0.1%",
|
"> 0.1%",
|
||||||
"ie 8",
|
"ie 8",
|
||||||
"ie 9"
|
"ie 9"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
"watch-assets": {
|
"watch-assets": {
|
||||||
"executor": "@nrwl/workspace:run-commands",
|
"executor": "@nrwl/workspace:run-commands",
|
||||||
"options": {
|
"options": {
|
||||||
"command": "pnpx grunt watch",
|
"command": "pnpm dlx grunt watch",
|
||||||
"cwd": "plugins/woocommerce/legacy"
|
"cwd": "plugins/woocommerce/legacy"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -193,7 +193,7 @@ Sometimes tests may fail for different reasons such as network issues, or lost c
|
||||||
|
|
||||||
```
|
```
|
||||||
cd plugins/woocommerce
|
cd plugins/woocommerce
|
||||||
E2E_RETRY_TIMES=2 pnpx wc-e2e test:e2e
|
E2E_RETRY_TIMES=2 pnpm exec wc-e2e test:e2e
|
||||||
```
|
```
|
||||||
|
|
||||||
### How to run tests in debug mode
|
### How to run tests in debug mode
|
||||||
|
@ -212,7 +212,7 @@ To run an individual test, use the direct path to the spec. For example:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd plugins/woocommerce
|
cd plugins/woocommerce
|
||||||
pnpx wc-e2e test:e2e ./tests/e2e/specs/wp-admin/create-order.test.js
|
pnpm exec wc-e2e test:e2e ./tests/e2e/specs/wp-admin/create-order.test.js
|
||||||
```
|
```
|
||||||
|
|
||||||
### How to skip tests
|
### How to skip tests
|
||||||
|
|
Loading…
Reference in New Issue