forked from Automattic/_s
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (41 loc) · 1.08 KB
/
lint-php.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: PHP Code Linting
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
lint-php:
name: Parallel lint
runs-on: ubuntu-latest
steps:
- name: Checkout the git repository
uses: actions/checkout@v2
- name: PHP setup
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
- name: Install composer packages
run: |
echo "ACF_PRO_KEY=${{ secrets.ACF_PRO_KEY }}" > .env
composer install --no-progress
- name: Check for PHP errors
run: composer lint:php
phpcs_check:
name: PHPCS check
runs-on: ubuntu-latest
steps:
- name: Checkout the git repository
uses: actions/checkout@v2
- name: PHP setup
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
- name: Install composer packages
run: |
echo "ACF_PRO_KEY=${{ secrets.ACF_PRO_KEY }}" > .env
composer install --no-progress
- name: Check coding standards using PHPCS
run: composer lint:wpcs