2023-03-02 09:57:41 +00:00
|
|
|
name: Setup local test environment
|
|
|
|
description: Set up a wp-env testing environment
|
|
|
|
permissions: {}
|
|
|
|
|
|
|
|
inputs:
|
|
|
|
test-type:
|
|
|
|
required: true
|
|
|
|
type: choice
|
|
|
|
options:
|
|
|
|
- e2e
|
|
|
|
- api
|
|
|
|
- k6
|
|
|
|
|
|
|
|
runs:
|
|
|
|
using: composite
|
|
|
|
steps:
|
|
|
|
- name: Load docker images and start containers for E2E or API tests
|
|
|
|
if: ( inputs.test-type == 'e2e' ) || ( inputs.test-type == 'api' )
|
|
|
|
working-directory: plugins/woocommerce
|
|
|
|
shell: bash
|
2023-12-06 17:32:32 +00:00
|
|
|
run: pnpm env:test
|
2023-03-02 09:57:41 +00:00
|
|
|
|
|
|
|
- name: Load docker images and start containers for k6 performance tests
|
|
|
|
if: inputs.test-type == 'k6'
|
|
|
|
working-directory: plugins/woocommerce
|
|
|
|
shell: bash
|
|
|
|
run: |
|
2023-12-06 17:32:32 +00:00
|
|
|
pnpm --filter=@woocommerce/plugin-woocommerce env:dev
|
|
|
|
pnpm --filter=@woocommerce/plugin-woocommerce env:performance-init
|