-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (56 loc) · 2.24 KB
/
plugin-check.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Blockera Plugin Checkup
on:
pull_request:
types: [opened, synchronize, ready_for_review]
workflow_dispatch:
# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
# The concurrency group contains the workflow name and the branch name for pull requests
# or the commit hash for any other events.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
jobs:
test_wp_plugin_check:
name: WordPress (PCP)
runs-on: ubuntu-latest
if: ${{ github.repository == 'blockeraai/blockera' || github.event_name == 'pull_request' }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js and install dependencies
uses: ./.github/setup-node
- name: Setup PHP Composer install dependencies
uses: ./.github/setup-php
with:
composer-options: '--no-dev -o --apcu-autoloader -a'
- name: Build Plugin Zip File
uses: ./.github/build-plugin-zip
- name: Extract blockera.zip to build directory
run: |
mkdir build
unzip blockera.zip -d ./build/blockera
rm -rf blockera.zip
- name: Test With WordPress Plugin Check (PCP)
uses: wordpress/plugin-check-action@v1
with:
build-dir: './build/blockera'
categories: |
general
security
performance
plugin_repo
accessibility
test_php_security_check:
name: PHP Security Check
runs-on: ubuntu-latest
if: ${{ github.repository == 'blockeraai/blockera' || github.event_name == 'pull_request' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache mechanism
uses: actions/cache@v2
with:
path: ~/.symfony/cache
key: db
- name: Run PHP Security Check
uses: symfonycorp/security-checker-action@v5