2022-03-28 07:23:57 +00:00
|
|
|
name: Lint and tests for JS packages and woocommerce-admin/client
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- 'packages/js/**/**'
|
|
|
|
- 'plugins/woocommerce-admin/client/**'
|
|
|
|
- '!**.md'
|
2022-04-21 16:45:12 +00:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
2022-03-28 07:23:57 +00:00
|
|
|
|
|
|
|
jobs:
|
2022-03-28 08:59:43 +00:00
|
|
|
lint-test-js:
|
2022-03-29 02:05:12 +00:00
|
|
|
name: Lint and Test JS
|
2022-04-27 01:28:56 +00:00
|
|
|
runs-on: ubuntu-20.04
|
2022-03-28 07:23:57 +00:00
|
|
|
steps:
|
2022-05-17 18:48:24 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-03-28 07:23:57 +00:00
|
|
|
|
|
|
|
- uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: '16'
|
|
|
|
|
2022-05-17 18:48:24 +00:00
|
|
|
- uses: ./.github/actions/cache-deps
|
2022-04-21 16:45:12 +00:00
|
|
|
with:
|
2022-05-17 18:48:24 +00:00
|
|
|
workflow_name: pr-lint-test-js
|
|
|
|
workflow_cache: ${{ secrets.WORKFLOW_CACHE }}
|
2022-04-21 16:45:12 +00:00
|
|
|
|
2022-05-17 18:48:24 +00:00
|
|
|
- name: Setup PHP
|
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
|
with:
|
|
|
|
php-version: '7.4'
|
2022-04-21 16:45:12 +00:00
|
|
|
|
2022-05-17 18:48:24 +00:00
|
|
|
- name: Install and Build
|
|
|
|
uses: ./.github/actions/install-build
|
2022-03-28 07:23:57 +00:00
|
|
|
|
|
|
|
- name: Lint
|
2022-08-05 00:03:17 +00:00
|
|
|
run: pnpm run lint --filter='woocommerce/client/admin...' --filter='!@woocommerce/e2e*' --filter='!@woocommerce/api' --color
|
2022-03-28 07:23:57 +00:00
|
|
|
|
|
|
|
- name: Test
|
2022-08-05 00:03:17 +00:00
|
|
|
run: pnpm run test --filter='woocommerce/client/admin...' --filter='!@woocommerce/e2e*' --filter='!@woocommerce/api' --color
|