Skip to content

2.0.0

2.0.0 #110

Workflow file for this run

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/