-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (55 loc) · 1.56 KB
/
Copy pathpull_request.yml
File metadata and controls
59 lines (55 loc) · 1.56 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
---
on: pull_request
name: Linting, analysis, tests
permissions:
contents: read
jobs:
php-versions:
name: Lookup PHP versions
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.versions.outputs.matrix }}
steps:
- uses: actions/checkout@v7
- uses: antfroger/php-version-action@v1
id: versions
review_codestyle:
name: PHP
runs-on: ubuntu-24.04
needs: php-versions
strategy:
matrix:
php-version: ${{ fromJSON(needs.php-versions.outputs.matrix) }}
steps:
- uses: actions/checkout@v7
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: none
tools: composer:v2
- name: Validate composer.json
run: |
composer validate --no-check-all --no-check-publish
- name: Install composer dependencies
run: |
composer install --no-interaction --no-progress
# Add vendor/bin to PATH for subsequent steps, see
# https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#adding-a-system-path
composer config bin-dir --absolute >> "${GITHUB_PATH}"
- name: phpunit
run: |
phpunit
- name: phpstan
run: |
phpstan
- name: phpcs
run: |
phpcs
markdown_lint:
name: Markdown
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- name: markdownlint
uses: DavidAnson/markdownlint-cli2-action@v24