diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml new file mode 100644 index 00000000..2a9afbc9 --- /dev/null +++ b/.github/workflows/linters.yml @@ -0,0 +1,22 @@ +name: Static Analysis (Linting) + +# This workflow is triggered on pushes to trunk, and any PRs. +on: + push: + branches: [trunk] + pull_request: + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup + uses: WordPress/wporg-repo-tools/.github/actions/setup@trunk + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Lint + uses: WordPress/wporg-repo-tools/.github/actions/lint@trunk diff --git a/package.json b/package.json index 21f2b020..80ea10e0 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,8 @@ "setup:tools": "yarn && composer install && TEXTDOMAIN=wporg composer exec update-configs", "setup:wp": "wp-env run cli bash env/setup.sh", "update:tools": "composer update && TEXTDOMAIN=wporg composer exec update-configs", - "wp-env": "wp-env" + "wp-env": "wp-env", + "lint:php": "echo \"No PHP lint.\"" }, "workspaces": [ "source/wp-content/themes/wporg-parent-2021"