-
-
Notifications
You must be signed in to change notification settings - Fork 125
66 lines (54 loc) · 2.07 KB
/
ci-quality.yml
File metadata and controls
66 lines (54 loc) · 2.07 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
name: PHP Quality Checks
on:
pull_request:
push:
branches: [ main ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
quality:
name: Static Analysis & Code Style
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup PHP 7.4
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
extensions: mbstring, intl, mysqli
coverage: none
tools: composer:v2
- name: Get Composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
working-directory: openml_OS
- name: Cache Composer packages
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('openml_OS/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install Composer dependencies (including dev)
run: composer install --prefer-dist --no-progress --no-interaction
working-directory: openml_OS
- name: PHP-CS-Fixer — check code style (dry run)
run: composer run cs:check
working-directory: openml_OS
- name: PHPStan — static analysis (level 3)
run: composer run phpstan
working-directory: openml_OS
- name: Psalm — static analysis (level 8, informational)
# continue-on-error so Psalm reports issues without blocking PRs initially.
# Remove this once the codebase is clean enough to enforce.
continue-on-error: true
run: composer run psalm
working-directory: openml_OS
- name: PHPMD — code smell detection (informational)
# continue-on-error so PHPMD reports issues without blocking PRs initially.
# Remove this once the codebase is clean enough to enforce.
continue-on-error: true
run: composer run phpmd
working-directory: openml_OS