woocommerce/.github/actions/tests/setup-local-test-environment/action.yml

30 lines
889 B
YAML
Raw Normal View History

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-11-28 22:50:43 +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: |
pnpm --filter=@woocommerce/plugin-woocommerce env:dev
pnpm --filter=@woocommerce/plugin-woocommerce env:performance-init