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'
|
|
|
|
|
|
|
|
jobs:
|
2022-03-28 08:59:43 +00:00
|
|
|
lint-test-js:
|
2022-03-28 07:23:57 +00:00
|
|
|
runs-on: ubuntu-18.04
|
|
|
|
steps:
|
|
|
|
- name: Cancel Previous Runs
|
|
|
|
uses: styfle/cancel-workflow-action@0.7.0
|
|
|
|
with:
|
|
|
|
access_token: ${{ github.token }}
|
|
|
|
|
|
|
|
- name: Check out repository code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: '16'
|
|
|
|
|
|
|
|
- name: Install PNPM and install dependencies
|
|
|
|
run: npm install -g pnpm && pnpm install
|
|
|
|
|
|
|
|
- name: Lint
|
|
|
|
run: |
|
|
|
|
pnpm nx lint woocommerce-admin
|
2022-03-28 08:59:43 +00:00
|
|
|
pnpm nx lint:js:packages woocommerce-admin
|
2022-03-28 07:23:57 +00:00
|
|
|
|
|
|
|
- name: Test
|
|
|
|
run: |
|
|
|
|
pnpm nx build woocommerce-admin
|
|
|
|
pnpm nx test woocommerce-admin
|
2022-03-28 08:59:43 +00:00
|
|
|
pnpm nx test:packages woocommerce-admin
|