-
Notifications
You must be signed in to change notification settings - Fork 431
70 lines (68 loc) · 3.13 KB
/
grumphp.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: GrumPHP
on: [push, pull_request]
permissions:
contents: read
jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest, macos-latest] #windows-latest currently not working
php-versions: ['8.1', '8.2', '8.3', '8.4']
composer-deps: ['highest', 'lowest', 'lock']
composer-versions: ['composer:v2']
fail-fast: false
name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }} with ${{ matrix.composer-versions }} ${{ matrix.composer-deps }}
steps:
- name: Checkout
uses: actions/checkout@master
- name: Install PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
tools: ${{ matrix.composer-versions }}
extensions: xdebug, mbstring, posix
- name: Check Versions
run: |
php -v
php -m
composer --version
- name: Set env vars for latest PHP version
if: matrix.php-versions == '8.4'
run: |
export COMPOSER_IGNORE_PLATFORM_REQ=php+
export BOX_REQUIREMENT_CHECKER=0
- name: Get composer cache directory
id: composercache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies (highest)
if: matrix.composer-deps == 'highest'
run: composer update --prefer-dist --no-progress --no-suggest
- name: Install dependencies (lowest)
if: matrix.composer-deps == 'lowest'
run: composer update --prefer-dist --no-progress --no-suggest --prefer-lowest
- name: Install dependencies (lock)
if: matrix.composer-deps == 'lock'
run: |
composer install --no-progress --no-suggest
composer validate
- name: Set git variables
run: |
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
git config --global protocol.file.allow always
- name: Run the tests on Windows
if: runner.os == 'Windows'
run: php vendor/bin/grumphp run --no-interaction --testsuite=windows
- name: Run the tests on unix
if: runner.os != 'Windows'
run: php vendor/bin/grumphp run --no-interaction --testsuite=ci
continue-on-error: ${{ matrix.php-versions == '8.4' && matrix.composer-deps == 'lowest' }}
- name: Run paratest outside of grumphp
run: php ./vendor/bin/paratest --testsuite=E2E -f --verbose