Skip to content

Commit d6572c4

Browse files
committed
Fix Windows CI and add PHP 8.2 tests
1 parent c4f7ad6 commit d6572c4

File tree

1 file changed

+7
-35
lines changed

1 file changed

+7
-35
lines changed

Diff for: .github/workflows/main.yml

+7-35
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,23 @@ jobs:
1313
security:
1414
name: Security
1515
runs-on: ${{ matrix.os }}
16-
1716
strategy:
1817
fail-fast: false
1918
matrix:
20-
php: [ '8.1' ] # Note: This workflow requires only the LATEST version of PHP
19+
php: [ '8.1' ]
2120
os: [ ubuntu-latest ]
22-
23-
steps: # General Steps
21+
steps:
2422
- name: Set Git To Use LF
2523
run: |
2624
git config --global core.autocrlf false
2725
git config --global core.eol lf
2826
- name: Checkout
2927
uses: actions/checkout@v2
30-
31-
# Install PHP Dependencies
3228
- name: Setup PHP ${{ matrix.php }}
3329
uses: shivammathur/setup-php@v2
3430
with:
3531
php-version: ${{ matrix.php }}
36-
- name: Validate Composer
37-
run: composer validate
3832
- name: Get Composer Cache Directory
39-
# Docs: <https://github.com/actions/cache/blob/master/examples.md#php---composer>
4033
id: composer-cache
4134
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
4235
- name: Restore Composer Cache
@@ -51,38 +44,29 @@ jobs:
5144
timeout_minutes: 5
5245
max_attempts: 5
5346
command: composer update --prefer-dist --no-interaction --no-progress
54-
55-
# Execution
5647
- name: Security Advisories
5748
run: composer require --dev roave/security-advisories:dev-latest
5849

5950
psalm:
6051
name: Psalm
6152
runs-on: ${{ matrix.os }}
62-
6353
strategy:
6454
fail-fast: false
6555
matrix:
66-
php: [ '8.1' ] # Note: This workflow requires only the LATEST version of PHP
56+
php: [ '8.1' ]
6757
os: [ ubuntu-latest ]
68-
69-
steps: # General Steps
58+
steps:
7059
- name: Set Git To Use LF
7160
run: |
7261
git config --global core.autocrlf false
7362
git config --global core.eol lf
7463
- name: Checkout
7564
uses: actions/checkout@v2
76-
77-
# Install PHP Dependencies
7865
- name: Setup PHP ${{ matrix.php }}
7966
uses: shivammathur/setup-php@v2
8067
with:
8168
php-version: ${{ matrix.php }}
82-
- name: Validate Composer
83-
run: composer validate
8469
- name: Get Composer Cache Directory
85-
# Docs: <https://github.com/actions/cache/blob/master/examples.md#php---composer>
8670
id: composer-cache
8771
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
8872
- name: Restore Composer Cache
@@ -97,45 +81,35 @@ jobs:
9781
timeout_minutes: 5
9882
max_attempts: 5
9983
command: composer update --prefer-dist --no-interaction --no-progress
100-
101-
# Execution
10284
- name: Static Analysis
10385
continue-on-error: true
10486
run: vendor/bin/psalm --no-cache
10587

10688
unit-tests:
10789
name: Build (${{matrix.php}}, ${{ matrix.os }}, ${{ matrix.stability }})
10890
runs-on: ${{ matrix.os }}
109-
11091
strategy:
11192
fail-fast: false
11293
matrix:
113-
php: [ '8.1' ]
94+
php: [ '8.1', '8.2' ]
11495
os: [ ubuntu-latest, macos-latest, windows-latest ]
11596
stability: [ prefer-lowest, prefer-stable ]
116-
117-
steps: # General Steps
97+
steps:
11898
- name: Set Git To Use LF
11999
run: |
120100
git config --global core.autocrlf false
121101
git config --global core.eol lf
122102
- name: Checkout
123103
uses: actions/checkout@v2
124-
125-
# Install PHP Dependencies
126104
- name: Setup PHP ${{ matrix.php }}
127105
uses: shivammathur/setup-php@v2
128106
with:
129107
php-version: ${{ matrix.php }}
130-
# PHP Extras
131108
coverage: pcov
132109
tools: pecl
133110
ini-values: "memory_limit=-1"
134111
extensions: phar, ffi
135-
- name: Validate Composer
136-
run: composer validate
137112
- name: Get Composer Cache Directory
138-
# Docs: <https://github.com/actions/cache/blob/master/examples.md#php---composer>
139113
id: composer-cache
140114
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
141115
- name: Restore Composer Cache
@@ -149,14 +123,12 @@ jobs:
149123
with:
150124
timeout_minutes: 5
151125
max_attempts: 5
152-
command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress
126+
command: composer update --${{ matrix.stability }} --ignore-platform-reqs --prefer-dist --no-interaction --no-progress
153127
- name: Install Linux SDL2
154128
if: runner.os == 'Linux'
155129
run: sudo apt-get install -y libsdl2-2.0-0
156130
- name: Install MacOS SDL2
157131
if: runner.os == 'macOS'
158132
run: brew install sdl2
159-
160-
# Execution
161133
- name: Execute Tests
162134
run: vendor/bin/phpunit --testdox --verbose

0 commit comments

Comments
 (0)