Skip to content

Commit acdbbda

Browse files
authored
Merge pull request #8874 from greg0ire/build-with-dbal-3
Build with DBAL 3
2 parents 692277e + 6a267f5 commit acdbbda

File tree

2 files changed

+80
-0
lines changed

2 files changed

+80
-0
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,56 @@ env:
88
fail-fast: true
99

1010
jobs:
11+
phpunit-smoke-check-dbal-3:
12+
name: "Experimental: PHPUnit with SQLite and DBAL 3"
13+
runs-on: "ubuntu-20.04"
14+
continue-on-error: true
15+
16+
strategy:
17+
matrix:
18+
php-version:
19+
- "8.0"
20+
21+
steps:
22+
- name: "Checkout"
23+
uses: "actions/checkout@v2"
24+
with:
25+
fetch-depth: 2
26+
27+
- name: "Install PHP"
28+
uses: "shivammathur/setup-php@v2"
29+
with:
30+
php-version: "${{ matrix.php-version }}"
31+
extensions: "pdo, pdo_sqlite"
32+
coverage: "pcov"
33+
ini-values: "zend.assertions=1"
34+
35+
- name: "Require DBAL 3"
36+
run: "composer require doctrine/dbal ^3.0 --no-update"
37+
38+
- name: "Install dependencies with Composer"
39+
uses: "ramsey/composer-install@v1"
40+
41+
- name: "Run PHPUnit"
42+
continue-on-error: true
43+
run: "vendor/bin/phpunit -c ci/github/phpunit/sqlite.xml --coverage-clover=coverage-no-cache.xml"
44+
env:
45+
ENABLE_SECOND_LEVEL_CACHE: 0
46+
47+
- name: "Run PHPUnit with Second Level Cache"
48+
id: "phpunit-run-slc"
49+
continue-on-error: true
50+
run: "vendor/bin/phpunit -c ci/github/phpunit/sqlite.xml --exclude-group performance,non-cacheable,locking_functional --coverage-clover=coverage-cache.xml"
51+
env:
52+
ENABLE_SECOND_LEVEL_CACHE: 1
53+
54+
- name: "Upload coverage file"
55+
uses: "actions/upload-artifact@v2"
56+
if: "steps.phpunit-run-slc.outcome == 'success' && steps.phpunit-run-slc.conclusion == 'success'"
57+
with:
58+
name: "phpunit-sqlite-${{ matrix.php-version }}-dbal3-coverage"
59+
path: "coverage*.xml"
60+
1161
phpunit-smoke-check:
1262
name: "PHPUnit with SQLite"
1363
runs-on: "ubuntu-20.04"

.github/workflows/static-analysis.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,21 @@ jobs:
1313
static-analysis-phpstan:
1414
name: "Static Analysis with PHPStan"
1515
runs-on: "ubuntu-20.04"
16+
continue-on-error: "${{ matrix.status == 'experimental' }}"
1617

1718
strategy:
19+
fail-fast: false
1820
matrix:
1921
php-version:
2022
- "8.0"
23+
dbal-version:
24+
- "default"
25+
status:
26+
- "stable"
27+
include:
28+
- dbal-version: "^3.0"
29+
php-version: "8.0"
30+
status: "experimental"
2131

2232
steps:
2333
- name: "Checkout code"
@@ -29,22 +39,37 @@ jobs:
2939
coverage: "none"
3040
php-version: "${{ matrix.php-version }}"
3141

42+
- name: "Require DBAL 3"
43+
run: "composer require doctrine/dbal ${{ matrix.dbal-version }} --no-update"
44+
if: "${{ matrix.dbal-version != 'default' }}"
45+
3246
- name: "Install dependencies with Composer"
3347
uses: "ramsey/composer-install@v1"
3448
with:
3549
dependency-versions: "highest"
3650

3751
- name: "Run a static analysis with phpstan/phpstan"
52+
continue-on-error: "${{ matrix.status == 'experimental' }}"
3853
run: "vendor/bin/phpstan analyse"
3954

4055
static-analysis-psalm:
4156
name: "Static Analysis with Psalm"
4257
runs-on: "ubuntu-20.04"
58+
continue-on-error: "${{ matrix.status == 'experimental' }}"
4359

4460
strategy:
61+
fail-fast: false
4562
matrix:
4663
php-version:
4764
- "8.0"
65+
dbal-version:
66+
- "default"
67+
status:
68+
- "stable"
69+
include:
70+
- dbal-version: "^3.0"
71+
php-version: "8.0"
72+
status: "experimental"
4873

4974
steps:
5075
- name: "Checkout code"
@@ -56,10 +81,15 @@ jobs:
5681
coverage: "none"
5782
php-version: "${{ matrix.php-version }}"
5883

84+
- name: "Require DBAL 3"
85+
run: "composer require doctrine/dbal ${{ matrix.dbal-version }} --no-update"
86+
if: "${{ matrix.dbal-version != 'default' }}"
87+
5988
- name: "Install dependencies with Composer"
6089
uses: "ramsey/composer-install@v1"
6190
with:
6291
dependency-versions: "highest"
6392

6493
- name: "Run a static analysis with vimeo/psalm"
94+
continue-on-error: "${{ matrix.status == 'experimental' }}"
6595
run: "vendor/bin/psalm --show-info=false --stats --output-format=github --threads=$(nproc)"

0 commit comments

Comments
 (0)