Updating all instances of pnpx to pnpm dlx/exec

This commit is contained in:
Joel T 2022-04-07 17:19:25 -07:00
parent 1e3a3d8af5
commit 1c162a14d2
11 changed files with 537 additions and 540 deletions

View File

@ -68,7 +68,7 @@ jobs:
- name: Load docker images and start containers.
working-directory: package/woocommerce/plugins/woocommerce
run: pnpx wc-e2e docker:up
run: pnpm exec wc-e2e docker:up
- name: Run tests command.
working-directory: package/woocommerce/plugins/woocommerce
@ -76,7 +76,7 @@ jobs:
WC_E2E_SCREENSHOTS: 1
E2E_SLACK_TOKEN: ${{ secrets.E2E_SLACK_TOKEN }}
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
uses: actions/upload-artifact@v2
@ -127,7 +127,7 @@ jobs:
- name: Load docker images and start containers.
working-directory: package/woocommerce/plugins/woocommerce
run: pnpx wc-e2e docker:up
run: pnpm exec wc-e2e docker:up
- name: Run tests command.
working-directory: package/woocommerce/plugins/woocommerce
@ -135,7 +135,7 @@ jobs:
BASE_URL: http://localhost:8084
USER_KEY: admin
USER_SECRET: password
run: pnpx wc-api-tests test api
run: pnpm exec wc-api-tests test api
- name: Upload API test report
uses: actions/upload-artifact@v2
@ -190,7 +190,7 @@ jobs:
- name: Load docker images and start containers.
working-directory: package/woocommerce/plugins/woocommerce
run: pnpx wc-e2e docker:up
run: pnpm exec wc-e2e docker:up
- name: Install k6
run: |

View File

@ -55,7 +55,7 @@ jobs:
UPDATE_WC: 1
DEFAULT_TIMEOUT_OVERRIDE: 120000
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
if: always()
@ -86,7 +86,7 @@ jobs:
UPDATE_WC: 1
DEFAULT_TIMEOUT_OVERRIDE: 120000
run: |
pnpx wc-e2e test:e2e
pnpm exec wc-e2e test:e2e
- name: Post E2E tests results comment on PR
if: always()

View File

@ -7,7 +7,6 @@ jobs:
name: Daily smoke test on trunk.
runs-on: ubuntu-18.04
steps:
- name: Create dirs.
run: |
mkdir -p code/woocommerce
@ -49,9 +48,9 @@ jobs:
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
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
build:
name: Build zip for PR
@ -117,7 +116,7 @@ jobs:
- name: Load docker images and start containers.
working-directory: package/woocommerce/plugins/woocommerce
run: pnpx wc-e2e docker:up
run: pnpm exec wc-e2e docker:up
- name: Move current directory to code. We will install zip file in this dir later.
run: mv ./package/woocommerce/plugins/woocommerce/* ./code/woocommerce
@ -150,5 +149,5 @@ jobs:
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
pnpm exec wc-e2e test:e2e tests/e2e/specs/smoke-tests/upload-plugin.js
pnpm exec wc-e2e test:e2e

View File

@ -10,7 +10,6 @@ jobs:
name: Daily smoke test on release.
runs-on: ubuntu-18.04
steps:
- name: Create dirs.
run: |
mkdir -p code/woocommerce
@ -53,9 +52,9 @@ jobs:
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
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
@ -63,7 +62,6 @@ jobs:
matrix:
wp: ['1', '2']
steps:
- name: Create dirs.
run: |
mkdir -p code/woocommerce
@ -195,5 +193,5 @@ jobs:
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
pnpm exec wc-e2e test:e2e tests/e2e/specs/smoke-tests/upload-plugin.js
pnpm exec wc-e2e test:e2e

View File

@ -38,7 +38,7 @@ report() {
if [[ $REPORT_EXIT_CODE -eq 0 && $GITHUB_ACTIONS != "true" ]]; then
echo "To view the report on your browser, run:"
echo ""
echo "pnpx allure open \"$ALLURE_REPORT_DIR\""
echo "pnpm dlx allure open \"$ALLURE_REPORT_DIR\""
echo ""
fi
}

View File

@ -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:
```
E2E_RETRY_TIMES=2 pnpx wc-e2e test:e2e
E2E_RETRY_TIMES=2 pnpm exec wc-e2e test:e2e
```
#### Test Screenshots

View File

@ -52,7 +52,7 @@ wp plugin install wp-mail-logging --activate
The container build script supports an initialization script parameter
```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

View File

@ -9,7 +9,7 @@
"options": {
"commands": [
{
"command": "pnpx grunt assets",
"command": "pnpm dlx grunt assets",
"forwardAllArgs": false
}
],
@ -25,11 +25,11 @@
"options": {
"commands": [
{
"command": "pnpx grunt eslint",
"command": "pnpm dlx grunt eslint",
"forwardAllArgs": false
},
{
"command": "pnpx grunt stylelint",
"command": "pnpm dlx grunt stylelint",
"forwardAllArgs": false
}
],

View File

@ -18,14 +18,14 @@
"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",
"lint:js": "eslint assets/js --ext=js",
"docker:down": "pnpx wc-e2e docker:down",
"docker:ssh": "pnpx wc-e2e docker:ssh",
"docker:up": "pnpx wc-e2e docker:up",
"test:api": "ALLURE_OUTPUT_DIR=\"$PWD/tests/api\" pnpx wc-api-tests test api",
"make:collection": "pnpx wc-api-tests make:collection",
"test:e2e": "pnpx wc-e2e test:e2e",
"test:e2e-debug": "pnpx wc-e2e test:e2e-debug",
"test:e2e-dev": "pnpx wc-e2e test:e2e-dev",
"docker:down": "pnpm exec wc-e2e docker:down",
"docker:ssh": "pnpm exec wc-e2e docker:ssh",
"docker:up": "pnpm exec wc-e2e docker:up",
"test:api": "ALLURE_OUTPUT_DIR=\"$PWD/tests/api\" pnpm exec wc-api-tests test api",
"make:collection": "pnpm exec wc-api-tests make:collection",
"test:e2e": "pnpm exec wc-e2e test:e2e",
"test:e2e-debug": "pnpm exec wc-e2e test:e2e-debug",
"test:e2e-dev": "pnpm exec wc-e2e test:e2e-dev",
"test:unit": "./vendor/bin/phpunit -c ./phpunit.xml",
"makepot": "composer run-script makepot",
"packages:fix:textdomain": "node ./bin/package-update-textdomain.js",

View File

@ -65,7 +65,7 @@
"watch-assets": {
"executor": "@nrwl/workspace:run-commands",
"options": {
"command": "pnpx grunt watch",
"command": "pnpm dlx grunt watch",
"cwd": "plugins/woocommerce/legacy"
}
},

View File

@ -193,7 +193,7 @@ Sometimes tests may fail for different reasons such as network issues, or lost c
```
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
@ -212,7 +212,7 @@ To run an individual test, use the direct path to the spec. For example:
```bash
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