-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (47 loc) · 1.42 KB
/
workflow.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
name: Complete Workflow
on: [ push, pull_request ]
jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Checkout Actions
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
# coverage: none
- name: Setup Composer
uses: php-actions/composer@v6
- name: Cache composer dependencies
uses: actions/cache@v4
with:
path: vendor
key: composer-${{ hashFiles('composer.lock') }}
# - name: Run composer install
# run: composer install -n --prefer-dist
- name: Run psalm
run: ./vendor/bin/psalm --shepherd --threads=2 --no-cache --output-format=github
- name: PHPUnit Tests
uses: php-actions/phpunit@v3
env:
XDEBUG_MODE: coverage
with:
bootstrap: vendor/autoload.php
configuration: phpunit.xml
php_extensions: xdebug
args: tests --coverage-clover ./coverage.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4.0.1
with:
files: ./coverage.xml
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: PHP Mess Detector
uses: php-actions/phpmd@v1
with:
php_version: 8.1
path: src/,demos/,tests/
output: text
ruleset: phpmd.xml