Add linting to CI for monorepo utils, add to CI unit tests for docs. (#39240)

This commit is contained in:
Sam Seay 2023-07-18 08:47:13 +08:00 committed by GitHub
parent 2f407cb172
commit a511e72b4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 27 additions and 3 deletions

View File

@ -26,4 +26,4 @@ jobs:
run: pnpm run -r --filter='release-posts' --filter='woocommerce/client/admin...' --filter='@woocommerce/monorepo-utils' --filter='!@woocommerce/e2e*' --filter='!@woocommerce/api' --color lint
- name: Test
run: pnpm run test --filter='woocommerce/client/admin...' --filter='!@woocommerce/e2e*' --filter='!@woocommerce/api' --color
run: pnpm run test --filter='woocommerce/client/admin...' --filter='@woocommerce/monorepo-utils' --filter='!@woocommerce/e2e*' --filter='@woocommerce/monorepo-utils' --filter='!@woocommerce/api' --color

View File

@ -0,0 +1,24 @@
name: Run unit for other PHP plugins
on:
pull_request:
paths-ignore:
- '**/changelog/**'
permissions: {}
jobs:
test:
runs-on: ubuntu-20.04
permissions:
contents: read
steps:
- uses: actions/checkout@v3
- name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo
with:
php-version: '8.0'
- name: Run WooCommerce Docs Tests
run: pnpm test:unit
working-directory: ./plugins/woocommerce-docs

View File

@ -4,7 +4,6 @@
"description": "WooCommerce Docs Plugin",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "wp-scripts build",
"start": "wp-scripts start",
"postinstall": "composer install",

View File

@ -45,7 +45,8 @@
"start": "tsc --watch",
"lint": "eslint . --ext .ts",
"postinstall": "pnpm run build",
"test": "jest"
"turbo:test": "jest",
"test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name"
},
"engines": {
"node": "^16.14.1",