30 lines
889 B
YAML
30 lines
889 B
YAML
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
|
|
run: pnpm env:test
|
|
|
|
- name: Load docker images and start containers for k6 performance tests
|
|
if: inputs.test-type == 'k6'
|
|
working-directory: plugins/woocommerce
|
|
shell: bash
|
|
run: |
|
|
pnpm --filter=@woocommerce/plugin-woocommerce env:dev
|
|
pnpm --filter=@woocommerce/plugin-woocommerce env:performance-init
|