Skip to content

Commit 52711dd

Browse files
authored
Add Scrutinizer, add php 8.1 to the CI (#20)
1 parent 7913228 commit 52711dd

File tree

5 files changed

+54
-8
lines changed

5 files changed

+54
-8
lines changed

.github/workflows/ci-mssql.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ jobs:
2323
- php: '8.0'
2424
extensions: pdo, pdo_sqlsrv
2525
mssql: 'server:2019-latest'
26+
- php: '8.1'
27+
extensions: pdo, pdo_sqlsrv-5.10.0beta2
28+
mssql: 'server:2019-latest'
2629

2730
services:
2831
mssql:
@@ -62,10 +65,11 @@ jobs:
6265
run: composer self-update
6366

6467
- name: Install dependencies with composer
68+
if: matrix.php != '8.2'
6569
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
6670

67-
- name: Install dependencies with composer php 8.0
68-
if: matrix.php == '8.0'
71+
- name: Install dependencies with composer php 8.2
72+
if: matrix.php == '8.2'
6973
run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
7074

7175
- name: Run tests with phpunit without coverage

.github/workflows/ci-mysql.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121

2222
php-version:
2323
- "8.0"
24+
- "8.1"
2425

2526
mysql-version:
2627
- "5.7"
@@ -77,8 +78,13 @@ jobs:
7778
php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
7879
7980
- name: Install dependencies with composer
81+
if: matrix.php-version != '8.2'
8082
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
8183

84+
- name: Install dependencies with composer php 8.2
85+
if: matrix.php-version == '8.2'
86+
run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
87+
8288
- name: Run mysql tests with phpunit
8389
env:
8490
DB: mysql

.github/workflows/ci-pgsql.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
- ubuntu-latest
2121
php-version:
2222
- "8.0"
23+
- "8.1"
2324

2425
pgsql-version:
2526
- "10"
@@ -78,8 +79,13 @@ jobs:
7879
php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
7980
8081
- name: Install dependencies with composer
82+
if: matrix.php-version != '8.2'
8183
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
8284

85+
- name: Install dependencies with composer php 8.2
86+
if: matrix.php-version == '8.2'
87+
run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
88+
8389
- name: Run pgsql tests with phpunit
8490
env:
8591
DB: postgres

.github/workflows/main.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515

1616
php-version:
1717
- "8.0"
18+
- "8.1"
1819
steps:
1920
- name: Checkout
2021
uses: actions/checkout@v2
@@ -29,7 +30,7 @@ jobs:
2930
php-version: ${{ matrix.php-version }}
3031
coverage: pcov
3132
tools: pecl
32-
extensions: mbstring, pdo, pdo_sqlite, pdo_pgsql, pdo_sqlsrv, pdo_mysql
33+
extensions: mbstring, pdo, pdo_sqlite, pdo_pgsql, pdo_sqlsrv-5.10.0beta2, pdo_mysql
3334
- name: Get Composer Cache Directory
3435
id: composer-cache
3536
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
@@ -39,18 +40,26 @@ jobs:
3940
path: ${{ steps.composer-cache.outputs.dir }}
4041
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
4142
restore-keys: ${{ runner.os }}-composer-
42-
- name: Install Dependencies
43-
run: composer install --no-interaction --prefer-dist
43+
- name: Install dependencies with composer
44+
if: matrix.php-versions != '8.2'
45+
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
46+
- name: Install dependencies with composer php 8.2
47+
if: matrix.php-versions == '8.2'
48+
run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
4449
- name: Execute Tests
4550
run: |
46-
vendor/bin/phpunit --coverage-clover=coverage.xml
51+
vendor/bin/phpunit --coverage-clover=coverage.clover
4752
- name: Upload coverage to Codecov
4853
continue-on-error: true # if is fork
4954
uses: codecov/codecov-action@v1
5055
with:
5156
token: ${{ secrets.CODECOV_TOKEN }}
52-
file: ./coverage.xml
53-
57+
file: ./coverage.clover
58+
- name: Upload coverage to Scrutinizer
59+
continue-on-error: true # if is fork
60+
uses: sudo-bot/action-scrutinizer@latest
61+
with:
62+
cli-args: "--format=php-clover coverage.clover"
5463
sqlite:
5564
name: SQLite PHP ${{ matrix.php-version }}
5665
runs-on: ${{ matrix.os }}

.scrutinizer.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
checks:
2+
php: true
3+
4+
filter:
5+
paths:
6+
- "src/*"
7+
8+
tools:
9+
external_code_coverage:
10+
timeout: 600 # Timeout in seconds.
11+
runs: 2 # How many code coverage submissions Scrutinizer will wait
12+
13+
build:
14+
nodes:
15+
analysis:
16+
environment:
17+
php: 8.0
18+
19+
tests:
20+
override:
21+
- php-scrutinizer-run

0 commit comments

Comments
 (0)