-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (57 loc) · 2 KB
/
ci.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: CI
on:
push:
pull_request:
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [ '8.1', '8.2', '8.3' ]
laravel: [ '9', '10' ]
# exclude:
# - php: '8.0'
# laravel: '10'
name: PHP ${{ matrix.php }} / Laravel ${{ matrix.laravel }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
coverage: xdebug
- name: Setup Problem Matchers
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Select Laravel 9
uses: nick-invision/retry@v3
if: ${{ matrix.laravel == '9' }}
with:
timeout_minutes: 3
max_attempts: 3
command: composer require "laravel/framework:9.*" "orchestra/testbench:^7.40" "pestphp/pest:^1.22" "pestphp/pest-plugin-laravel:^1.4" "spatie/pest-plugin-snapshots:^1.1" --no-update --no-interaction
- name: Select Laravel 10
uses: nick-invision/retry@v3
if: ${{ matrix.laravel == '10' }}
with:
timeout_minutes: 3
max_attempts: 3
command: composer require "laravel/framework:10.*" "orchestra/testbench:^8.21" "pestphp/pest:^2.34" "pestphp/pest-plugin-laravel:^2.3" "spatie/pest-plugin-snapshots:^2.1" --no-update --no-interaction
- name: Install PHP Dependencies
uses: nick-invision/retry@v3
with:
timeout_minutes: 3
max_attempts: 3
command: composer update --no-interaction --no-progress
- name: Check code style
run: composer run lint
- name: Execute tests
run: composer run test:ci
- name: Check code coverage
uses: codecov/codecov-action@v4
if: ${{ matrix.php == '8.3' && matrix.laravel == '10' }}
with:
file: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}