Skip to content

Commit 4384891

Browse files
authored
Merge pull request #46 from jrfnl/feature/ghactions-various-tweaks
GH Actions: various workflow tweaks
2 parents 5f670ce + 7a5f10a commit 4384891

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed

.github/workflows/check-cs.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
pull_request:
88
branches:
99
- "*"
10+
# Allow manually triggering the workflow.
11+
workflow_dispatch:
1012

1113
jobs:
1214
fix-style:
@@ -25,11 +27,14 @@ jobs:
2527
with:
2628
php-version: 7.4
2729
coverage: none
28-
tools: composer
30+
tools: composer, cs2pr
2931

3032
- name: Install dependencies
3133
run: |
3234
composer update --prefer-dist --no-suggest --no-progress
3335
3436
- name: Check Code Style
35-
run: vendor/bin/phpcs
37+
run: vendor/bin/phpcs --report-full --report-checkstyle=./phpcs-report.xml
38+
39+
- name: Show PHPCS results in PR
40+
run: cs2pr ./phpcs-report.xml

.github/workflows/run-tests.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ on:
99
- "*"
1010
schedule:
1111
- cron: '0 0 * * *'
12+
# Allow manually triggering the workflow.
13+
workflow_dispatch:
1214

1315
jobs:
1416
php-tests:
@@ -19,10 +21,17 @@ jobs:
1921

2022
strategy:
2123
matrix:
22-
php: [8.x, 7.4, 7.3]
24+
php: ['8.0', '7.4', '7.3']
2325
dependency-version: [prefer-lowest, prefer-stable]
26+
experimental: [false]
27+
28+
include:
29+
- php: '8.1'
30+
dependency-version: 'prefer-stable'
31+
experimental: true
2432

2533
name: P${{ matrix.php }} - ${{ matrix.dependency-version }}
34+
continue-on-error: ${{ matrix.experimental }}
2635

2736
steps:
2837
- name: Checkout code
@@ -35,9 +44,15 @@ jobs:
3544
coverage: none
3645
tools: composer
3746

38-
- name: Install dependencies
47+
- name: Install dependencies - normal
48+
if: ${{ matrix.php < 8.1 }}
3949
run: |
4050
composer update --${{ matrix.dependency-version }} --prefer-dist --no-progress
4151
52+
- name: Install dependencies - ignore platform reqs
53+
if: ${{ matrix.php >= 8.1 }}
54+
run: |
55+
composer update --${{ matrix.dependency-version }} --prefer-dist --no-progress --ignore-platform-reqs
56+
4257
- name: Execute Unit Tests
4358
run: vendor/bin/phpunit

0 commit comments

Comments
 (0)