forked from PhpUnitsOfMeasure/php-units-of-measure
-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (50 loc) · 1.54 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
# .github/workflows/code_checks.yaml
name: Code_Checks
on: ["push", "pull_request"]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['7.2']
stability: [ prefer-stable ]
experimental: [false]
include:
- php: '7.2'
stability: prefer-lowest
- php: '7.3'
- php: '7.4'
- php: '8.0'
- php: '8.1'
- php: '8.2'
name: PHP ${{ matrix.php }} - ${{ matrix.stability }} tests
steps:
# basically git clone
- uses: actions/checkout@v3
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.composer/cache/files
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
# use PHP of specific version
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: pcov
coverage: pcov
- name: Install dependencies
run: |
composer install --verbose --prefer-dist --no-interaction -o
- name: Execute tests
run: vendor/bin/phpunit -c ./tests/phpunit.xml.dist ./tests --verbose
cs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: 8.2
coverage: none # disable xdebug, pcov
- run: composer install --no-progress
- run: ./vendor/bin/phpcs --encoding=utf-8 --extensions=php --standard=./tests/phpcs.xml -nsp ./