Speed up the lint and test task by doing pnpm install instead of full setup (#39760)
This commit is contained in:
parent
462c690d61
commit
2926acb521
|
@ -22,8 +22,22 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup WooCommerce Monorepo
|
||||
uses: ./.github/actions/setup-woocommerce-monorepo
|
||||
- name: Setup PNPM
|
||||
uses: pnpm/action-setup@c3b53f6a16e57305370b4ae5a540c2077a1d50dd
|
||||
with:
|
||||
version: '8.6.7'
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
cache: pnpm
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
|
||||
- name: Install prerequisites
|
||||
run: |
|
||||
# ignore scripts is faster, and postinstall should not be needed for lint.
|
||||
pnpm install --ignore-scripts
|
||||
|
||||
- name: Lint
|
||||
run: pnpm run -r --filter='release-posts' --filter='woocommerce/client/admin...' --filter='@woocommerce/monorepo-utils' --filter='!@woocommerce/e2e*' --filter='!@woocommerce/api' --color lint
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
name: Lint and tests for JS packages and woocommerce-admin/client
|
||||
name: Run tests for JS packages and woocommerce-admin/client
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
@ -11,7 +11,7 @@ concurrency:
|
|||
permissions: {}
|
||||
|
||||
jobs:
|
||||
lint-test-js:
|
||||
test-js:
|
||||
name: Run JS Tests
|
||||
runs-on: ubuntu-20.04
|
||||
permissions:
|
||||
|
@ -19,8 +19,22 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup WooCommerce Monorepo
|
||||
uses: ./.github/actions/setup-woocommerce-monorepo
|
||||
- name: Setup PNPM
|
||||
uses: pnpm/action-setup@c3b53f6a16e57305370b4ae5a540c2077a1d50dd
|
||||
with:
|
||||
version: '8.6.7'
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
cache: pnpm
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
|
||||
- name: Install prerequisites
|
||||
run: |
|
||||
# ignore scripts is faster, and postinstall should not be needed for tests.
|
||||
pnpm install --ignore-scripts
|
||||
|
||||
- name: Test
|
||||
run: pnpm run test --filter='woocommerce/client/admin...' --filter='@woocommerce/monorepo-utils' --filter='!@woocommerce/e2e*' --filter='@woocommerce/monorepo-utils' --filter='!@woocommerce/api' --color
|
||||
|
|
Loading…
Reference in New Issue