generated from glhd/laravel-package-template
-
Notifications
You must be signed in to change notification settings - Fork 3
69 lines (55 loc) · 2.07 KB
/
phpunit.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
name: PHPUnit
on:
push:
pull_request:
schedule:
- cron: '0 14 * * 3' # Run Wednesdays at 2pm EST
jobs:
php-tests:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ 8.1 ]
laravel: [ ^9.0 ]
dependency-version: [ stable ]
name: "${{ matrix.php }} / ${{ matrix.laravel }} (${{ matrix.dependency-version }})"
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, bcmath, intl, iconv
tools: composer:v2
- name: Setup Chrome Driver
uses: nanasess/setup-chromedriver@v1
- name: Start Chrome Driver
run: |
export DISPLAY=:99
chromedriver --port=9515 &
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
- name: Register composer cache directory
id: composer-cache-files-dir
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
vendor
${{ steps.composer-cache-files-dir.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Set minimum stability
run: composer config minimum-stability ${{ matrix.minimum-stability }}
- name: Install dependencies
env:
COMPOSER_DISCARD_CHANGES: true
run: composer require --no-suggest --no-progress --no-interaction --prefer-dist --update-with-all-dependencies "laravel/framework:${{ matrix.laravel }}"
- name: Set dependency version
env:
COMPOSER_DISCARD_CHANGES: true
run: composer update --no-suggest --no-progress --no-interaction --no-suggest --prefer-dist --with-all-dependencies --prefer-${{ matrix.dependency-version }}
- name: Execute tests
run: vendor/bin/phpunit