Skip to content

Commit 7499560

Browse files
authored
Merge pull request #36: Maintenance
2 parents 9b7ad13 + 096b509 commit 7499560

File tree

82 files changed

+1298
-1137
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+1298
-1137
lines changed

.editorconfig

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# editorconfig.org
2-
31
root = true
42

53
[*]
@@ -9,3 +7,12 @@ insert_final_newline = true
97
indent_style = space
108
indent_size = 4
119
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[*.{yml,yaml}]
15+
indent_size = 2
16+
17+
[Makefile]
18+
indent_style = tab

.gitattributes

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
/.github export-ignore
2-
/.editorconfig export-ignore
3-
/.gitattributes export-ignore
4-
/.gitignore export-ignore
5-
/tests export-ignore
1+
/.* export-ignore
2+
/tests export-ignore
3+
/*.xml export-ignore
4+
/*.yml export-ignore
5+
/*.lock export-ignore
6+
/*.dist export-ignore

.github/workflows/ci-mssql.yml

+9-79
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,16 @@
1-
on:
2-
pull_request:
1+
---
2+
3+
on: # yamllint disable-line rule:truthy
34
push:
45
branches:
56
- '*.*'
7+
- '*.*.*'
8+
pull_request: null
69

7-
name: ci-mssql
10+
name: MSSQL
811

912
jobs:
10-
tests:
11-
name: PHP ${{ matrix.php }}-mssql-${{ matrix.mssql }}
12-
13-
env:
14-
key: cache
15-
16-
runs-on: ubuntu-latest
17-
18-
strategy:
19-
fail-fast: false
20-
matrix:
21-
include:
22-
- php: '8.0'
23-
extensions: pdo, pdo_sqlsrv
24-
mssql: 'server:2017-latest'
25-
- php: '8.0'
26-
extensions: pdo, pdo_sqlsrv
27-
mssql: 'server:2019-CU25-ubuntu-20.04'
28-
- php: '8.1'
29-
extensions: pdo, pdo_sqlsrv
30-
mssql: 'server:2019-CU25-ubuntu-20.04'
31-
- php: '8.2'
32-
extensions: pdo, pdo_sqlsrv
33-
mssql: 'server:2019-CU25-ubuntu-20.04'
34-
- php: '8.3'
35-
extensions: pdo, pdo_sqlsrv
36-
mssql: 'server:2019-CU25-ubuntu-20.04'
37-
38-
services:
39-
mssql:
40-
image: mcr.microsoft.com/mssql/${{ matrix.mssql }}
41-
env:
42-
SA_PASSWORD: SSpaSS__1
43-
ACCEPT_EULA: Y
44-
MSSQL_PID: Developer
45-
ports:
46-
- 11433:1433
47-
options: --name=mssql --health-cmd="/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'SSpaSS__1' -Q 'SELECT 1'" --health-interval=10s --health-timeout=5s --health-retries=3
48-
49-
steps:
50-
- name: Checkout
51-
uses: actions/[email protected]
52-
53-
- name: Install PHP with extensions
54-
uses: shivammathur/setup-php@v2
55-
with:
56-
php-version: ${{ matrix.php }}
57-
extensions: ${{ matrix.extensions }}
58-
ini-values: date.timezone='UTC'
59-
tools: composer:v2, pecl
60-
61-
- name: Determine composer cache directory on Linux
62-
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
63-
64-
- name: Cache dependencies installed with composer
65-
uses: actions/cache@v2
66-
with:
67-
path: ${{ env.COMPOSER_CACHE_DIR }}
68-
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
69-
restore-keys: |
70-
php${{ matrix.php }}-composer-
71-
72-
- name: Update composer
73-
run: composer self-update
74-
75-
- name: Install dependencies with composer
76-
if: matrix.php != '8.4'
77-
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
78-
79-
- name: Install dependencies with composer php 8.4
80-
if: matrix.php == '8.4'
81-
run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
13+
phpunit:
14+
uses: cycle/gh-actions/.github/workflows/db-mssql.yml@master
8215

83-
- name: Run tests with phpunit without coverage
84-
env:
85-
DB: sqlserver
86-
run: vendor/bin/phpunit --group driver-sqlserver --colors=always
16+
...

.github/workflows/ci-mysql.yml

+9-89
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,16 @@
1-
on:
2-
pull_request:
1+
---
2+
3+
on: # yamllint disable-line rule:truthy
34
push:
45
branches:
56
- '*.*'
7+
- '*.*.*'
8+
pull_request: null
69

7-
name: ci-mysql
10+
name: MySQL
811

912
jobs:
10-
tests:
11-
name: PHP ${{ matrix.php-version }}-mysql-${{ matrix.mysql-version }}
12-
env:
13-
extensions: curl, intl, pdo, pdo_mysql
14-
key: cache-v1
15-
16-
runs-on: ${{ matrix.os }}
17-
18-
strategy:
19-
fail-fast: false
20-
matrix:
21-
os:
22-
- ubuntu-latest
23-
24-
php-version:
25-
- "8.0"
26-
- "8.1"
27-
- "8.2"
28-
- "8.3"
29-
30-
mysql-version:
31-
- "5.7"
32-
- "8.0"
33-
34-
services:
35-
mysql:
36-
image: mysql:${{ matrix.mysql-version }}
37-
env:
38-
MYSQL_ROOT_PASSWORD: root
39-
MYSQL_DATABASE: spiral
40-
MYSQL_AUTHENTICATION_PLUGIN: mysql_native_password
41-
ports:
42-
- 13306:3306
43-
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
44-
45-
steps:
46-
- name: Checkout
47-
uses: actions/checkout@v2
48-
49-
- name: Setup cache environment
50-
id: cache-env
51-
uses: shivammathur/cache-extensions@v1
52-
with:
53-
php-version: ${{ matrix.php-version }}
54-
extensions: ${{ env.extensions }}
55-
key: ${{ env.key }}
56-
57-
- name: Cache extensions
58-
uses: actions/cache@v2
59-
with:
60-
path: ${{ steps.cache-env.outputs.dir }}
61-
key: ${{ steps.cache-env.outputs.key }}
62-
restore-keys: ${{ steps.cache-env.outputs.key }}
63-
64-
- name: Install PHP with extensions
65-
uses: shivammathur/setup-php@v2
66-
with:
67-
php-version: ${{ matrix.php-version }}
68-
extensions: ${{ env.extensions }}
69-
ini-values: date.timezone='UTC'
70-
coverage: pcov
71-
72-
- name: Determine composer cache directory
73-
if: matrix.os == 'ubuntu-latest'
74-
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
75-
76-
- name: Cache dependencies installed with composer
77-
uses: actions/cache@v2
78-
with:
79-
path: ${{ env.COMPOSER_CACHE_DIR }}
80-
key: php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.json') }}
81-
restore-keys: |
82-
php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
83-
84-
- name: Install dependencies with composer
85-
if: matrix.php-version != '8.4'
86-
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
87-
88-
- name: Install dependencies with composer php 8.4
89-
if: matrix.php-version == '8.4'
90-
run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
13+
phpunit:
14+
uses: cycle/gh-actions/.github/workflows/db-mysql.yml@master
9115

92-
- name: Run mysql tests with phpunit
93-
env:
94-
DB: mysql
95-
MYSQL: ${{ matrix.mysql-version }}
96-
run: vendor/bin/phpunit --group driver-mysql --colors=always
16+
...

.github/workflows/ci-pgsql.yml

+9-90
Original file line numberDiff line numberDiff line change
@@ -1,97 +1,16 @@
1-
on:
2-
pull_request:
1+
---
2+
3+
on: # yamllint disable-line rule:truthy
34
push:
45
branches:
56
- '*.*'
7+
- '*.*.*'
8+
pull_request: null
69

7-
name: ci-pgsql
10+
name: Postgres
811

912
jobs:
10-
tests:
11-
name: PHP ${{ matrix.php-version }}-pgsql-${{ matrix.pgsql-version }}
12-
env:
13-
extensions: curl, intl, pdo, pdo_pgsql
14-
key: cache-v1
15-
16-
runs-on: ${{ matrix.os }}
17-
18-
strategy:
19-
fail-fast: false
20-
matrix:
21-
os:
22-
- ubuntu-latest
23-
php-version:
24-
- "8.0"
25-
- "8.1"
26-
- "8.2"
27-
- "8.3"
28-
29-
pgsql-version:
30-
- "10"
31-
- "11"
32-
- "12"
33-
- "13"
34-
35-
services:
36-
postgres:
37-
image: postgres:${{ matrix.pgsql-version }}
38-
env:
39-
POSTGRES_USER: postgres
40-
POSTGRES_PASSWORD: postgres
41-
POSTGRES_DB: spiral
42-
ports:
43-
- 15432:5432
44-
options: --name=postgres --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3
45-
46-
steps:
47-
- name: Checkout
48-
uses: actions/checkout@v2
49-
50-
- name: Setup cache environment
51-
id: cache-env
52-
uses: shivammathur/cache-extensions@v1
53-
with:
54-
php-version: ${{ matrix.php-version }}
55-
extensions: ${{ env.extensions }}
56-
key: ${{ env.key }}
57-
58-
- name: Cache extensions
59-
uses: actions/cache@v2
60-
with:
61-
path: ${{ steps.cache-env.outputs.dir }}
62-
key: ${{ steps.cache-env.outputs.key }}
63-
restore-keys: ${{ steps.cache-env.outputs.key }}
64-
65-
- name: Install PHP with extensions
66-
uses: shivammathur/setup-php@v2
67-
with:
68-
php-version: ${{ matrix.php-version }}
69-
extensions: ${{ env.extensions }}
70-
ini-values: date.timezone='UTC'
71-
coverage: pcov
72-
73-
- name: Determine composer cache directory
74-
if: matrix.os == 'ubuntu-latest'
75-
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
76-
77-
- name: Cache dependencies installed with composer
78-
uses: actions/cache@v2
79-
with:
80-
path: ${{ env.COMPOSER_CACHE_DIR }}
81-
key: php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.json') }}
82-
restore-keys: |
83-
php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
84-
85-
- name: Install dependencies with composer
86-
if: matrix.php-version != '8.4'
87-
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
88-
89-
- name: Install dependencies with composer php 8.4
90-
if: matrix.php-version == '8.4'
91-
run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
13+
phpunit:
14+
uses: cycle/gh-actions/.github/workflows/db-pgsql.yml@master
9215

93-
- name: Run pgsql tests with phpunit
94-
env:
95-
DB: postgres
96-
POSTGRES: ${{ matrix.pgsql-version }}
97-
run: vendor/bin/phpunit --group driver-postgres --colors=always
16+
...

.github/workflows/cs-fix.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
3+
on: # yamllint disable-line rule:truthy
4+
push:
5+
branches:
6+
- '*'
7+
8+
name: Fix Code Style
9+
10+
jobs:
11+
cs-fix:
12+
permissions:
13+
contents: write
14+
uses: spiral/gh-actions/.github/workflows/cs-fix.yml@master
15+
16+
...

0 commit comments

Comments
 (0)