-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (52 loc) · 1.78 KB
/
php.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
name: CI Workflow
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
tests:
runs-on: ubuntu-20.04
continue-on-error: ${{ matrix.experimental }}
strategy:
max-parallel: 10
matrix:
robinvdvleuten-ulid:
- '~4.0'
- '~5.0'
php:
- '7.3'
- '7.4'
- '8.0'
experimental: [ false ]
include:
- php: 8.1
experimental: true
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.composer/cache/files
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: pdo, pdo_sqlite
coverage: xdebug
- name: Install dependencies
run: |
composer install --prefer-dist --no-interaction
- name: Install robinvdvleuten/ulid ${{ matrix.robinvdvleuten-ulid }}
run: |
composer req robinvdvleuten/ulid ${{ matrix.robinvdvleuten-ulid }} --prefer-dist --no-interaction
- name: Check code style
run: ./vendor/bin/phpcs --standard=psr2 -n src/
- name: Execute tests
run: ./vendor/bin/phpunit --coverage-clover=coverage.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}