-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (55 loc) · 1.83 KB
/
workflow.yml
File metadata and controls
68 lines (55 loc) · 1.83 KB
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
name: Complete Workflow
on:
push:
paths:
- '**/*.*'
pull_request:
paths:
- '**/*.*'
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.3'
coverage: xdebug
- name: Install Composer Dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Run psalm
run: ./vendor/bin/psalm --shepherd --threads=2 --no-cache --output-format=github
- name: Run Tests
run: |
php vendor/bin/phpunit --coverage-clover coverage.xml --configuration phpunit.xml tests
- name: Download clover-to-cobertura converter
run: |
curl https://raw.githubusercontent.com/ngyuki/clover-to-cobertura/master/clover-to-cobertura.php -o clover-to-cobertura.php
- name: Convert Clover to Cobertura
run: |
php clover-to-cobertura.php < coverage.xml > coverage-cobertura.xml
- uses: qltysh/qlty-action/coverage@v2
with:
token: ${{ secrets.QLTY_COVERAGE_TOKEN }}
files: ./coverage-cobertura.xml
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
- 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