-
Notifications
You must be signed in to change notification settings - Fork 10
53 lines (46 loc) · 1.22 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
name: CI
on:
pull_request:
branches:
- master
paths-ignore:
- '**.md'
push:
paths-ignore:
- '**.md'
jobs:
run:
name: Run
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
php-versions: ['7.4', '8.0', '8.1', '8.2']
env:
OS: ${{ matrix.os }}
PHP_VERSION: ${{ matrix.php-versions }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup PHP ${{ matrix.php-versions }} with composer v2
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: composer:v2
coverage: xdebug
- name: Testing PHP version
run: |
php -v
php -r "if(strpos(phpversion(), '${{ matrix.php-versions }}') === false) {throw new Exception('Wrong PHP version Installed');}"
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Run test suite
run: composer run-script test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
env_vars: OS,PHP_VERSION
files: ./coverage.xml
flags: unittests
verbose: true