Skip to content

Commit 8865271

Browse files
committed
Update file(s) from wp-cli/.github
1 parent bca9093 commit 8865271

File tree

1 file changed

+2
-83
lines changed

1 file changed

+2
-83
lines changed

.github/workflows/code-quality.yml

Lines changed: 2 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -7,87 +7,6 @@ on:
77
- main
88
- master
99

10-
# Cancels all previous workflow runs for the same branch that have not yet completed.
11-
concurrency:
12-
# The concurrency group contains the workflow name and the branch name.
13-
group: ${{ github.workflow }}-${{ github.ref }}
14-
cancel-in-progress: true
15-
1610
jobs:
17-
18-
lint: #-----------------------------------------------------------------------
19-
name: Lint PHP files
20-
runs-on: ubuntu-latest
21-
steps:
22-
- name: Check out source code
23-
uses: actions/checkout@v3
24-
25-
- name: Check existence of composer.json file
26-
id: check_composer_file
27-
uses: andstor/file-existence-action@v2
28-
with:
29-
files: "composer.json"
30-
31-
- name: Set up PHP environment
32-
if: steps.check_composer_file.outputs.files_exists == 'true'
33-
uses: shivammathur/setup-php@v2
34-
with:
35-
php-version: '7.4'
36-
tools: cs2pr
37-
env:
38-
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39-
40-
- name: Install Composer dependencies & cache dependencies
41-
if: steps.check_composer_file.outputs.files_exists == 'true'
42-
uses: "ramsey/composer-install@v2"
43-
env:
44-
COMPOSER_ROOT_VERSION: dev-${{ github.event.repository.default_branch }}
45-
46-
- name: Check existence of vendor/bin/parallel-lint file
47-
id: check_linter_file
48-
uses: andstor/file-existence-action@v2
49-
with:
50-
files: "vendor/bin/parallel-lint"
51-
52-
- name: Run Linter
53-
if: steps.check_linter_file.outputs.files_exists == 'true'
54-
run: vendor/bin/parallel-lint -j 10 . --exclude vendor --checkstyle | cs2pr
55-
56-
phpcs: #----------------------------------------------------------------------
57-
name: PHPCS
58-
runs-on: ubuntu-latest
59-
60-
steps:
61-
- name: Check out source code
62-
uses: actions/checkout@v3
63-
64-
- name: Check existence of composer.json & phpcs.xml.dist files
65-
id: check_files
66-
uses: andstor/file-existence-action@v2
67-
with:
68-
files: "composer.json, phpcs.xml.dist"
69-
70-
- name: Set up PHP environment
71-
if: steps.check_files.outputs.files_exists == 'true'
72-
uses: shivammathur/setup-php@v2
73-
with:
74-
php-version: '7.4'
75-
tools: cs2pr
76-
env:
77-
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78-
79-
- name: Install Composer dependencies & cache dependencies
80-
if: steps.check_files.outputs.files_exists == 'true'
81-
uses: "ramsey/composer-install@v2"
82-
env:
83-
COMPOSER_ROOT_VERSION: dev-${{ github.event.repository.default_branch }}
84-
85-
- name: Check existence of vendor/bin/phpcs file
86-
id: check_phpcs_binary_file
87-
uses: andstor/file-existence-action@v2
88-
with:
89-
files: "vendor/bin/phpcs"
90-
91-
- name: Run PHPCS
92-
if: steps.check_phpcs_binary_file.outputs.files_exists == 'true'
93-
run: vendor/bin/phpcs -q --report=checkstyle | cs2pr
11+
code-quality:
12+
uses: wp-cli/.github/.github/workflows/reusable-code-quality.yml

0 commit comments

Comments
 (0)