Skip to content

Commit a44d82e

Browse files
committed
setup regulard laravel doctrine orm workflow
1 parent 6bc4357 commit a44d82e

File tree

4 files changed

+117
-46
lines changed

4 files changed

+117
-46
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: "Coding Standards"
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "*.x"
7+
- "main"
8+
push:
9+
branches:
10+
- "*.x"
11+
- "main"
12+
13+
jobs:
14+
coding-standards:
15+
name: "Coding Standards"
16+
uses: "doctrine/.github/.github/workflows/[email protected]"
17+
with:
18+
php-version: '8.2'
19+
composer-options: '--prefer-dist --ignore-platform-req=php'
20+
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: "Continuous Integration"
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "*.x"
7+
- "main"
8+
push:
9+
branches:
10+
- "*.x"
11+
- "main"
12+
13+
jobs:
14+
phpunit:
15+
name: "PHPUnit"
16+
runs-on: "ubuntu-20.04"
17+
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
php-version:
22+
- "8.2"
23+
- "8.3"
24+
- "8.4"
25+
dependencies:
26+
- "highest"
27+
- "lowest"
28+
optional-dependencies:
29+
- true
30+
- false
31+
32+
steps:
33+
- name: "Checkout"
34+
uses: "actions/checkout@v2"
35+
with:
36+
fetch-depth: 2
37+
38+
- name: "Install PHP"
39+
uses: "shivammathur/setup-php@v2"
40+
with:
41+
php-version: "${{ matrix.php-version }}"
42+
coverage: "pcov"
43+
ini-values: "zend.assertions=1"
44+
extensions: "pdo_mysql"
45+
46+
- name: "Install dependencies with Composer"
47+
uses: "ramsey/composer-install@v1"
48+
with:
49+
dependency-versions: "${{ matrix.dependencies }}"
50+
composer-options: "--prefer-dist"
51+
52+
- name: "Show Composer packages"
53+
run: "composer show"
54+
55+
- name: "Run PHPUnit"
56+
run: "vendor/bin/phpunit --coverage-clover=coverage.xml"
57+
58+
- name: "Upload coverage"
59+
uses: "codecov/codecov-action@v5"
60+
with:
61+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/php.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

.github/workflows/static-analysis.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: "Static Analysis"
2+
3+
on:
4+
pull_request:
5+
push:
6+
7+
jobs:
8+
static-analysis-phpstan:
9+
name: "Static Analysis with PHPStan"
10+
runs-on: "ubuntu-22.04"
11+
12+
strategy:
13+
matrix:
14+
php-version:
15+
- "8.2"
16+
- "8.3"
17+
- "8.4"
18+
19+
steps:
20+
- name: "Checkout code"
21+
uses: "actions/checkout@v3"
22+
23+
- name: "Install PHP"
24+
uses: "shivammathur/setup-php@v2"
25+
with:
26+
coverage: "none"
27+
php-version: "${{ matrix.php-version }}"
28+
extensions: "pdo_sqlite"
29+
30+
- name: "Install dependencies with Composer"
31+
uses: "ramsey/composer-install@v2"
32+
with:
33+
dependency-versions: "${{ matrix.dependencies }}"
34+
35+
- name: "Run a static analysis with phpstan/phpstan"
36+
run: "vendor/bin/phpstan analyse src --level 1"

0 commit comments

Comments
 (0)