2.0.0 #110
Workflow file for this run
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: Pre-build Checks | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number }} | |
cancel-in-progress: true | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
branches: [master] | |
jobs: | |
php-lint: | |
name: PHP Code Lint | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
version: ['7.1', '8.3'] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.version }} | |
- name: Run Linter | |
run: php -l plugin/inline-spoilers.php | |
js-css-lint: | |
name: JS & CSS Code Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '22.14.0' | |
cache: 'npm' | |
cache-dependency-path: 'plugin/package-lock.json' | |
- name: Install Dependencies | |
working-directory: ./plugin | |
run: npm ci | |
- name: Run Linter | |
working-directory: ./plugin | |
run: | | |
npm run lint:js | |
npm run lint:css | |
codesniffer: | |
name: Code Standards | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.3' | |
- name: Setup CodeSniffer | |
run: composer install | |
- name: Check WordPress Coding Standards | |
run: ./vendor/bin/phpcs --standard=WordPress --extensions=php ./plugin/ |