File tree Expand file tree Collapse file tree 10 files changed +310
-90
lines changed Expand file tree Collapse file tree 10 files changed +310
-90
lines changed Original file line number Diff line number Diff line change
1
+ name : Code Quality
2
+
3
+ on :
4
+ pull_request :
5
+
6
+ jobs :
7
+ trufflehog :
8
+ uses : ./.github/workflows/truffle-hog.yml
9
+
10
+ virus-scan :
11
+ uses : ./.github/workflows/virus-scan.yml
Original file line number Diff line number Diff line change
1
+ name : Coding Standards
2
+
3
+ on :
4
+ pull_request :
5
+
6
+ jobs :
7
+ stylelint :
8
+ uses : ./.github/workflows/stylelint.yml
9
+
10
+ eslint :
11
+ uses : ./.github/workflows/eslint.yml
12
+
13
+ phpcs :
14
+ uses : ./.github/workflows/phpcs.yml
15
+
16
+ phpstan :
17
+ uses : ./.github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
1
+ name : JavaScript Coding Standards
2
+
3
+ on :
4
+ workflow_call :
5
+
6
+ permissions :
7
+ contents : read
8
+
9
+ jobs :
10
+ eslint :
11
+ runs-on : ubuntu-latest
12
+
13
+ steps :
14
+ - name : Checkout
15
+ uses : actions/checkout@v4
16
+
17
+ - name : Install Node.js
18
+ uses : actions/setup-node@v4
19
+ with :
20
+ node-version-file : .nvmrc
21
+ cache : " npm"
22
+
23
+ - name : Cache node modules
24
+ uses : actions/cache@v4
25
+ with :
26
+ path : ~/.npm
27
+ key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
28
+ restore-keys : |
29
+ ${{ runner.os }}-node-
30
+
31
+ - name : Check Node version
32
+ run : node -v
33
+
34
+ - name : Setup NPM
35
+ run : npm install -g npm@latest
36
+
37
+ - name : Check NPM version
38
+ run : npm -v
39
+
40
+ - name : Install dependencies
41
+ run : npm install
42
+
43
+ - name : Run Lint JS
44
+ run : npm run lint-js
Original file line number Diff line number Diff line change
1
+ name : JavaScript Unit Tests
2
+
3
+ on :
4
+ workflow_call :
5
+
6
+ permissions :
7
+ contents : read
8
+
9
+ jobs :
10
+ jest :
11
+ runs-on : ubuntu-latest
12
+
13
+ steps :
14
+ - name : Checkout
15
+ uses : actions/checkout@v4
16
+
17
+ - name : Install Node.js
18
+ uses : actions/setup-node@v4
19
+ with :
20
+ node-version-file : .nvmrc
21
+ cache : " npm"
22
+
23
+ - name : Cache node modules
24
+ uses : actions/cache@v4
25
+ with :
26
+ path : ~/.npm
27
+ key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
28
+ restore-keys : |
29
+ ${{ runner.os }}-node-
30
+
31
+ - name : Check Node version
32
+ run : node -v
33
+
34
+ - name : Setup NPM
35
+ run : npm install -g npm@latest
36
+
37
+ - name : Check NPM version
38
+ run : npm -v
39
+
40
+ - name : Install dependencies
41
+ run : npm install
42
+
43
+ - name : Run Jest
44
+ run : npm run test
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- name : PHP Checks
1
+ name : PHP Coding Standards
2
2
3
3
on :
4
- push :
5
- branches : ["trunk"]
6
- pull_request :
7
- branches : ["trunk"]
4
+ workflow_call :
8
5
9
6
permissions :
10
7
contents : read
11
8
12
9
jobs :
13
- build :
10
+ phpcs :
14
11
runs-on : ubuntu-latest
15
12
16
13
steps :
17
- - uses : actions/checkout@v3
14
+ - name : Checkout
15
+ uses : actions/checkout@v4
18
16
19
17
- name : Setup PHP with composer v2
20
18
uses : shivammathur/setup-php@v2
51
49
52
50
- name : Run PHPCS
53
51
run : composer lint
54
-
55
- - name : Run PHPStan
56
- run : composer static
Original file line number Diff line number Diff line change
1
+ name : PHP Static Analysis
2
+
3
+ on :
4
+ workflow_call :
5
+
6
+ permissions :
7
+ contents : read
8
+
9
+ jobs :
10
+ phpstan :
11
+ runs-on : ubuntu-latest
12
+
13
+ steps :
14
+ - name : Checkout
15
+ uses : actions/checkout@v4
16
+
17
+ - name : Setup PHP with composer v2
18
+ uses : shivammathur/setup-php@v2
19
+ with :
20
+ php-version : " 8.3"
21
+ tools : composer:v2
22
+
23
+ - name : Validate Root composer.json and composer.lock
24
+ run : composer validate --strict
25
+
26
+ - name : Validate Plugin composer.json and composer.lock
27
+ run : composer validate --strict --working-dir=mu-plugins/10up-plugin
28
+
29
+ - name : Validate Theme composer.json and composer.lock
30
+ run : composer validate --strict --working-dir=themes/10up-theme
31
+
32
+ - name : Cache Composer packages
33
+ id : composer-cache
34
+ uses : actions/cache@v4
35
+ with :
36
+ path : vendor
37
+ key : ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
38
+ restore-keys : |
39
+ ${{ runner.os }}-php-
40
+
41
+ - name : Install Root dependencies
42
+ run : composer install --prefer-dist --no-progress
43
+
44
+ - name : Install Plugin dependencies
45
+ run : composer install --prefer-dist --no-progress --working-dir=mu-plugins/10up-plugin
46
+
47
+ - name : Install Theme dependencies
48
+ run : composer install --prefer-dist --no-progress --working-dir=themes/10up-theme
49
+
50
+ - name : Run PHPStan
51
+ run : composer static
Original file line number Diff line number Diff line change
1
+ name : CSS Coding Standards
2
+
3
+ on :
4
+ workflow_call :
5
+
6
+ permissions :
7
+ contents : read
8
+
9
+ jobs :
10
+ stylelint :
11
+ runs-on : ubuntu-latest
12
+
13
+ steps :
14
+ - name : Checkout
15
+ uses : actions/checkout@v4
16
+
17
+ - name : Install Node.js
18
+ uses : actions/setup-node@v4
19
+ with :
20
+ node-version-file : .nvmrc
21
+ cache : " npm"
22
+
23
+ - name : Cache node modules
24
+ uses : actions/cache@v4
25
+ with :
26
+ path : ~/.npm
27
+ key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
28
+ restore-keys : |
29
+ ${{ runner.os }}-node-
30
+
31
+ - name : Check Node version
32
+ run : node -v
33
+
34
+ - name : Setup NPM
35
+ run : npm install -g npm@latest
36
+
37
+ - name : Check NPM version
38
+ run : npm -v
39
+
40
+ - name : Install dependencies
41
+ run : npm install
42
+
43
+ - name : Run Lint Style
44
+ run : npm run lint-style
45
+
Original file line number Diff line number Diff line change
1
+ name : Secret Scanning
2
+
3
+ on :
4
+ workflow_call :
5
+
6
+ permissions :
7
+ contents : read
8
+
9
+ jobs :
10
+ trufflehog :
11
+ runs-on : ubuntu-latest
12
+
13
+ steps :
14
+ - name : Checkout
15
+ uses : actions/checkout@v4
16
+ with :
17
+ fetch-depth : 0
18
+
19
+ - name : Trufflehog exclusions
20
+ run : |
21
+ if [ ! -f .trufflehog-exclude.txt ]; then
22
+ echo "# Paths to exclude from TruffleHog scanning" > .trufflehog-exclude.txt
23
+ echo "node_modules/" >> .trufflehog-exclude.txt
24
+ echo "vendor/" >> .trufflehog-exclude.txt
25
+ echo "dist/" >> .trufflehog-exclude.txt
26
+ echo "build/" >> .trufflehog-exclude.txt
27
+ fi
28
+
29
+ - name : Run Trufflehog on latest commits
30
+ id : trufflehog
31
+ uses : trufflesecurity/trufflehog@main
32
+ continue-on-error : true
33
+ with :
34
+ path : ./
35
+ extra_args : --results=verified,unknown --exclude-paths .trufflehog-exclude.txt
36
+
37
+ - name : Trufflehog Scan Failure
38
+ if : steps.trufflehog.outcome == 'failure'
39
+ run : exit 1
You can’t perform that action at this time.
0 commit comments