Merge pull request #5903 from Automattic/develop #8369
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint files | |
on: | |
push: | |
branches: | |
- develop | |
- staging | |
- production | |
- gh-readonly-queue/** | |
pull_request: | |
branches: | |
- develop | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
jobs: | |
lint-php: | |
name: Lint PHP files | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out source code | |
uses: actions/checkout@v4.2.0 | |
- name: Set up PHP | |
uses: shivammathur/setup-php@2.30.5 | |
with: | |
coverage: none | |
env: | |
fail-fast: 'true' | |
- name: Setup Node | |
uses: actions/setup-node@v4.0.4 | |
with: | |
node-version: 'lts/*' | |
cache: npm | |
- name: Install PHP Dependencies | |
uses: ramsey/composer-install@3.0.0 | |
- name: Lint files | |
run: npm run lint | |
lint-search-dev-tools: | |
name: Lint Search Dev Tools files | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out source code | |
uses: actions/checkout@v4.2.0 | |
- name: Setup Node | |
uses: actions/setup-node@v4.0.4 | |
with: | |
node-version: 'lts/*' | |
cache: npm | |
cache-dependency-path: search/search-dev-tools/package-lock.json | |
- name: Install dependencies | |
run: npm ci --ignore-scripts | |
working-directory: search/search-dev-tools | |
- name: Lint files | |
run: npm run lint | |
working-directory: search/search-dev-tools |