-
Notifications
You must be signed in to change notification settings - Fork 16
81 lines (79 loc) · 2.38 KB
/
main.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
PHPUnit:
strategy:
matrix:
operating-system: ["ubuntu-latest", "windows-latest", "macos-latest"]
php-version: ["5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"]
runs-on: ${{ matrix.operating-system }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Prepare Composer
uses: ./.github/actions/prepare-composer
with:
token: ${{ secrets.GITHUB_TOKEN }}
php-version: ${{ matrix.php-version }}
package: phpunit/phpunit
- name: Run PHPUnit
run: composer test
PHP_CodeSniffer:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Prepare Composer
uses: ./.github/actions/prepare-composer
with:
token: ${{ secrets.GITHUB_TOKEN }}
package: squizlabs/php_codesniffer
- name: Run PHP_CodeSniffer
run: composer phpcs -- --no-cache
PHP-CS-Fixer:
runs-on: ubuntu-latest
env:
PHP_CS_FIXER_IGNORE_ENV: 1
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Prepare Composer
uses: ./.github/actions/prepare-composer
with:
token: ${{ secrets.GITHUB_TOKEN }}
package: friendsofphp/php-cs-fixer
- name: Run PHP Coding Standards Fixer
run: composer php-cs-fixer -- --dry-run --diff --using-cache=no
composer-normalize:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Prepare Composer
uses: ./.github/actions/prepare-composer
with:
token: ${{ secrets.GITHUB_TOKEN }}
package: ergebnis/composer-normalize
allow-plugins: 1
- name: Run composer-normalize
run: composer normalize --dry-run
coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Prepare Composer
uses: ./.github/actions/prepare-composer
with:
token: ${{ secrets.GITHUB_TOKEN }}
package: phpunit/phpunit
coverage: xdebug
- name: Run PHPUnit with coverage
run: composer test -- --do-not-cache-result --coverage-clover coverage.xml
- name: Upload coverage
uses: codecov/codecov-action@v3