-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (65 loc) · 1.96 KB
/
Copy pathmain.yml
File metadata and controls
70 lines (65 loc) · 1.96 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
69
70
name: "CI"
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: "read"
concurrency:
group: "ci-${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
composer:
name: "composer config validation"
runs-on: "ubuntu-latest"
timeout-minutes: 10
steps:
- name: "git checkout"
uses: "actions/checkout@v7"
with:
persist-credentials: false
- name: "Validate composer.json"
run: "composer validate --strict"
php:
name: "PHP ${{ matrix.php-version }} (${{ matrix.dependencies }})"
needs: "composer"
runs-on: "ubuntu-latest"
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
php-version:
- "8.1"
- "8.2"
- "8.3"
dependencies:
- "locked"
include:
- php-version: "8.1"
dependencies: "lowest"
steps:
- name: "git checkout"
uses: "actions/checkout@v7"
with:
persist-credentials: false
- name: "setup PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
extensions: "json"
tools: "composer:v2"
- name: "install composer dependencies (locked)"
if: "matrix.dependencies == 'locked'"
run: "composer install --prefer-dist --no-interaction --no-progress"
- name: "install composer dependencies (lowest)"
if: "matrix.dependencies == 'lowest'"
run: "composer update --prefer-lowest --prefer-dist --no-interaction --no-progress"
- name: "audit dependencies for known security vulnerabilities"
if: "matrix.php-version == '8.1'"
run: "composer audit"
- name: "lint PHP files"
run: "find src -type f -name '*.php' -print0 | xargs -0 -n1 php -l"
- name: "run PHPStan"
run: "php vendor/bin/phpstan analyse --no-progress"
- name: "run PHPCS"
run: "php vendor/bin/phpcs"