Skip to content

Update cli and workflows #232

Update cli and workflows

Update cli and workflows #232

Workflow file for this run

name: PR Checks
on:
pull_request:
types: [opened, synchronize]
jobs:
php-lint-test:
name: "PHP: Lint, Test"
timeout-minutes: 15
runs-on: ubuntu-latest
strategy:
matrix:
php: ["7.4", "8.0", "8.1", "8.2", "8.3"]
steps:
- name: Checkout and setup
uses: ./actions/checkout-n-setup
with:
lockfile: pnpm-hashed.lock
php-version: ${{ matrix.php }}
- name: Check syntax errors
# For plugins, we need to check production dependencies as well
# So, let us install them in src/temp to avoid their exclusion inside vendor
run: |
pnpm -r --parallel --filter "./plugins/**" exec composer config vendor-dir src/temp
pnpm -r --parallel --filter "./plugins/**" exec composer install --no-dev
find ./plugins/*/src ./packages/php/*/src ! -path "*/vendor/*" ! -path "*/node_modules/*" -type f -name '*.php' -print0 | xargs -0 -n1 -P4 php -l -n | (! grep -v "No syntax errors detected" )
- name: Setup
run: "pnpm run setup:php"
- name: Lint
run: "pnpm run lint:php"
- name: Test
run: "pnpm run test:php"
if: matrix.php == '8.3'
js-lint-build:
name: "JS: Lint, Build and Test"
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- name: Checkout and setup
uses: ./actions/checkout-n-setup
with:
lockfile: pnpm-hashed.lock
- name: Lint
run: "pnpm lint:js"
- name: Typecheck
run: pnpm typecheck
- name: Build
run: pnpm build