-
Notifications
You must be signed in to change notification settings - Fork 7
64 lines (52 loc) · 1.46 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
name: CI
on:
pull_request:
push:
branches:
- 'main'
env:
COMPOSER_UPDATE_FLAGS: "--no-interaction --no-progress --prefer-dist "
jobs:
tests:
runs-on: ubuntu-latest
name: Test
strategy:
fail-fast: false
matrix:
include:
- php: 7.4 # should use monolog v1
composer_update_flags: --prefer-lowest
- php: 7.4 # should use monolog v2
- php: 8.0 # should use monolog v2
- php: 8.1 # should use monolog v3
- php: 8.2 # should use monolog v3
- php: 8.3 # should use monolog v3
# TODO matrix should support Both versions of Sentry SDK
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
coverage: none
- name: Composer dependencies
run: COMPOSER_UPDATE_FLAGS+="${{matrix.composer_update_flags}}" make vendor
- name: PHPUnit
run: make phpunit
static-analysis:
runs-on: ubuntu-latest
name: Static analysis
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.1"
- name: Composer dependencies
run: make vendor
- name: Composer validate
run: make composer-validate
- name: PHPStan
run: make phpstan
- name: PHP CS Fixer
run: make php-cs-fixer-check