diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..81bbbdb --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,12 @@ +name: Lint + +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + +jobs: + lint: + # PILOT: points at the unmerged branch; switch to @master once themegrill/workflows#2 merges. + uses: themegrill/workflows/.github/workflows/lint.yml@add-shared-lint + with: + php-version: '7.4' diff --git a/.github/workflows/phpcs.yml b/.github/workflows/phpcs.yml deleted file mode 100644 index 7400a93..0000000 --- a/.github/workflows/phpcs.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: PHPCS - -on: - pull_request: - paths: - - '**.php' - -jobs: - phpcs: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up PHP - uses: shivammathur/setup-php@v2 - with: - php-version: '7.4' - tools: composer - - - name: Get changed PHP files - id: changed-files - uses: tj-actions/changed-files@v45 - with: - files: '**.php' - separator: ' ' - - - name: Install Composer dependencies - if: steps.changed-files.outputs.any_changed == 'true' - run: composer install --no-interaction --no-progress - - - name: Run PHPCS on changed files - if: steps.changed-files.outputs.any_changed == 'true' - env: - PHP_FILES: ${{ steps.changed-files.outputs.added_files }} ${{ steps.changed-files.outputs.copied_files }} ${{ steps.changed-files.outputs.modified_files }} ${{ steps.changed-files.outputs.renamed_files }} - run: | - if [ -n "$(echo "$PHP_FILES" | xargs)" ]; then - composer phpcs -- $PHP_FILES - else - echo "No existing PHP files to lint (only deletions in this PR)." - fi diff --git a/404.php b/404.php index 580c153..43907e7 100644 --- a/404.php +++ b/404.php @@ -52,3 +52,5 @@ get_sidebar(); get_sidebar( 'left' ); get_footer(); + +// Pilot test: harmless change to trigger the lint workflow. diff --git a/js/color-scheme-control.js b/js/color-scheme-control.js index 42eaf25..5ba8f07 100644 --- a/js/color-scheme-control.js +++ b/js/color-scheme-control.js @@ -85,3 +85,5 @@ } ); } ); } )( wp.customize ); + +// Pilot test.