-
Notifications
You must be signed in to change notification settings - Fork 2
80 lines (62 loc) · 2.09 KB
/
ci.yaml
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
71
72
73
74
75
76
77
78
79
80
name: CI
on:
push:
branches:
- master
pull_request:
env:
REQUIRED_PHP_EXTENSIONS: "curl, json"
jobs:
composer-validate:
name: "Validate composer.json"
runs-on: "ubuntu-latest"
strategy:
matrix:
php-version:
- "7.4"
steps:
- name: "Checkout code"
uses: actions/checkout@v3
- name: "Install PHP with extensions"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
extensions: "${{ env.REQUIRED_PHP_EXTENSIONS }}"
tools: "composer:v2"
- name: "Validate composer.json"
run: "composer validate"
tests:
name: "PHP ${{ matrix.php-version }} + ${{ matrix.dependencies }}"
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.allowed-to-fail }}
strategy:
matrix:
php-version:
- '7.4'
- '8.0'
- '8.1'
- '8.2'
- '8.3'
dependencies:
- 'highest'
allowed-to-fail: [false]
steps:
- name: "Checkout code"
uses: actions/checkout@v3
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
extensions: "${{ env.REQUIRED_PHP_EXTENSIONS }}"
tools: "composer:v2"
- name: Add PHPUnit matcher
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: "Composer install"
uses: "ramsey/composer-install@v1"
with:
dependency-versions: "${{ matrix.dependencies }}"
composer-options: "--prefer-dist"
- name: Run tests
run: vendor/bin/phpunit tests