-
Notifications
You must be signed in to change notification settings - Fork 4
52 lines (49 loc) · 1.52 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: build
on:
push:
pull_request:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
unit-tests:
name: Build (${{matrix.php}}, ${{ matrix.os }}, ${{ matrix.stability }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
php: [ '8.1', '8.2' ]
os: [ ubuntu-latest, macos-latest, windows-latest ]
stability: [ prefer-lowest, prefer-stable ]
steps:
- name: Set Git To Use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout
uses: actions/[email protected]
- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: pcov
tools: pecl
ini-values: ffi.enable=1
extensions: ffi
- name: Update Composer
run: composer self-update
- name: Validate Composer Config
run: composer validate
- name: Install Dependencies
uses: nick-invision/retry@v2
with:
timeout_minutes: 5
max_attempts: 5
command: composer update --${{ matrix.stability }} --ignore-platform-reqs --prefer-dist --no-interaction --no-progress
- name: Install Linux SDL2
if: runner.os == 'Linux'
run: sudo apt-get install -y libsdl2-2.0-0
- name: Install MacOS SDL2
if: runner.os == 'macOS'
run: brew install sdl2
- name: Execute Tests
run: vendor/bin/phpunit --testdox