Skip to content

Commit 6814726

Browse files
Add github actions
1 parent 0fb1735 commit 6814726

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Code Analysis
2+
3+
on:
4+
pull_request: null
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
rector_analysis:
11+
name: Rector analysis
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- uses: shivammathur/setup-php@v2
17+
with:
18+
php-version: 8.4
19+
extensions: json, mbstring, pdo, curl, pdo_sqlite
20+
coverage: none
21+
tools: symfony-cli
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
25+
- run: composer install --no-progress --ansi
26+
27+
- run: vendor/bin/rector process -n --no-progress-bar --ansi
28+
29+
code_analysis:
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
php-version: ['8.1', '8.2', '8.3', '8.4']
34+
actions:
35+
-
36+
name: Coding Standard
37+
# tip: add "--ansi" to commands in CI to make them full of colors
38+
run: vendor/bin/ecs check src --ansi
39+
40+
-
41+
name: PHPStan
42+
run: vendor/bin/phpstan analyse --ansi
43+
44+
-
45+
name: Check composer.json and composer.lock
46+
run: composer validate --strict --ansi
47+
48+
name: ${{ matrix.actions.name }} - PHP ${{ matrix.php-version }}
49+
runs-on: ubuntu-latest
50+
51+
steps:
52+
- uses: actions/checkout@v4
53+
# see https://github.com/shivammathur/setup-php
54+
- uses: shivammathur/setup-php@v2
55+
with:
56+
# test the lowest version, to make sure checks pass on it
57+
php-version: ${{ matrix.php-version }}
58+
extensions: json, mbstring, pdo, curl, pdo_sqlite
59+
coverage: none
60+
tools: symfony-cli
61+
env:
62+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63+
64+
- run: composer install --no-progress --ansi
65+
66+
- run: ${{ matrix.actions.run }}

0 commit comments

Comments
 (0)