woocommerce/.github/workflows/pr-lint-test-js.yml

48 lines
1.1 KiB
YAML
Raw Normal View History

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
jobs:
lint-test-js:
name: Lint and Test JS
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: '16'
- uses: ./.github/actions/cache-deps
2022-04-21 16:45:12 +00:00
with:
workflow_name: pr-lint-test-js
workflow_cache: ${{ secrets.WORKFLOW_CACHE }}
2022-04-21 16:45:12 +00:00
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
2022-04-21 16:45:12 +00:00
- name: Install and Build
uses: ./.github/actions/install-build
- name: Lint
run: |
2022-04-29 20:31:19 +00:00
pnpm nx build woocommerce-admin
pnpm nx lint woocommerce-admin
pnpm nx lint:js-packages woocommerce-admin
- name: Test
run: |
pnpm nx build woocommerce-admin
pnpm nx test woocommerce-admin
pnpm nx test:packages woocommerce-admin