-
Notifications
You must be signed in to change notification settings - Fork 24
50 lines (47 loc) · 1.23 KB
/
tests.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
name: CI
on:
pull_request: ~
push:
branches:
- master
schedule:
- cron: "47 6 * * 1" # once a month, to surface issues with newer dependencies
jobs:
Tests:
runs-on: 'ubuntu-latest'
strategy:
matrix:
php:
- '7.4'
- '8.0'
- '8.1'
- '8.2'
- '8.3'
- '8.4'
dependencies: ['highest']
include:
- description: '(lowest)'
php: '7.4'
dependencies: 'lowest'
name: PHP ${{ matrix.php }} ${{ matrix.description }}
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Install PHP"
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug
- name: "Install dependencies"
uses: ramsey/composer-install@v3
with:
dependency-versions: ${{ matrix.dependencies }}
- name: "Run PHPStan analysis"
run: composer phpstan
- name: "Run tests"
run: vendor/bin/phpunit --coverage-clover=coverage.xml --colors=always
- name: "Upload test coverage"
uses: codecov/codecov-action@v5
with:
files: './coverage.xml'
fail_ci_if_error: true