Skip to content

Commit 5d04808

Browse files
simplify github action workflow
1 parent 1e9d5ad commit 5d04808

File tree

1 file changed

+6
-22
lines changed

1 file changed

+6
-22
lines changed

.github/workflows/build.yml

+6-22
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,8 @@ name: Build
33
on: [ push, pull_request ]
44

55
jobs:
6-
coding-standards:
7-
name: "Coding Standards"
8-
runs-on: "ubuntu-latest"
9-
steps:
10-
- name: "Checkout"
11-
uses: "actions/checkout@v2"
12-
13-
- name: "Install PHP"
14-
uses: "shivammathur/setup-php@v2"
15-
with:
16-
coverage: "none"
17-
php-version: "8.3"
18-
tools: "cs2pr"
19-
20-
- name: "Install dependencies with Composer"
21-
uses: "ramsey/composer-install@v2"
22-
23-
- name: "Run PHP_CodeSniffer"
24-
run: "vendor/bin/phpcs -n -s --report=checkstyle | cs2pr"
25-
266
tests:
27-
name: "Tests"
28-
runs-on: "ubuntu-20.04"
7+
runs-on: "ubuntu-latest"
298
strategy:
309
matrix:
3110
php-version:
@@ -39,10 +18,15 @@ jobs:
3918
uses: "shivammathur/setup-php@v2"
4019
with:
4120
php-version: "${{ matrix.php-version }}"
21+
tools: "cs2pr"
4222

4323
- name: "Install dependencies with Composer"
4424
uses: "ramsey/composer-install@v2"
4525

26+
- name: "Run phpcs"
27+
if: ${{ matrix.php-version == '8.3' }}
28+
run: "vendor/bin/phpcs -n -s --report=checkstyle | cs2pr"
29+
4630
- name: "Run PHPUnit"
4731
run: "vendor/bin/phpunit"
4832

0 commit comments

Comments
 (0)