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

39 lines
966 B
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'
jobs:
lint-test-js:
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
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