-
Notifications
You must be signed in to change notification settings - Fork 32
55 lines (45 loc) · 1.46 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
name: "Build"
on: ["push", "pull_request"]
jobs:
static-analysis:
name: "Static analysis"
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
php:
- "7.4"
- "8.1"
steps:
- name: "Checkout"
uses: "actions/checkout@v3"
- name: "Setup PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: ${{ matrix.php }}
extensions: bcmath, gd, intl, soap, sockets, xsl, zip
ini-values: memory_limit=-1
tools: composer:v2
- name: "Cache Composer dependencies"
uses: "actions/cache@v2"
with:
path: "/tmp/composer-cache"
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: |
php${{ matrix.php }}-composer-
- name: Create auth.json
run: echo '${{ secrets.COMPOSER_AUTH_JSON }}' > $GITHUB_WORKSPACE/auth.json
- name: Composer install
run: composer install --no-interaction --prefer-dist
- name: Remove auth.json
run: rm -f $GITHUB_WORKSPACE/auth.json
- name: PHPUnit
run: vendor/bin/phpunit -c phpunit.xml.dist Test --no-interaction
- name: PHPCS
run: vendor/bin/phpcs
- name: PHPMD
run: vendor/bin/phpmd . text phpmd.xml
- name: PHPCPD
run: vendor/bin/phpcpd --exclude vendor .
- name: PHPStan
run: vendor/bin/phpstan analyse --ansi --no-interaction