Skip to content

Commit fbb6347

Browse files
committed
Initialize cycle/transaction
0 parents  commit fbb6347

37 files changed

Lines changed: 1982 additions & 0 deletions

.editorconfig

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
indent_style = space
8+
indent_size = 4
9+
trim_trailing_whitespace = true
10+
11+
[*.yaml]
12+
indent_size = 2
13+
14+
[*.yml]
15+
indent_size = 2
16+
17+
[*.http]
18+
end_of_line = crlf
19+
20+
[*.md]
21+
trim_trailing_whitespace = false
22+
23+
[Makefile]
24+
indent_style = tab

.gitattributes

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
* text=auto
2+
3+
.github export-ignore
4+
.* export-ignore
5+
*.dist export-ignore
6+
*.yaml export-ignore
7+
*.xml export-ignore
8+
composer.lock export-ignore
9+
composer-require-* export-ignore
10+
Makefile export-ignore
11+
Dockerfile export-ignore
12+
infection.* export-ignore
13+
tests export-ignore
14+
docs export-ignore
15+
resources export-ignore
16+
CLAUDE.md export-ignore
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3+
"release-type": "php",
4+
"packages": {
5+
".": {
6+
"package-name": "transaction",
7+
"changelog-path": "/CHANGELOG.md"
8+
}
9+
},
10+
"include-component-in-tag": false,
11+
"include-v-in-tag": false,
12+
"changelog-sections": [
13+
{
14+
"type": "feat",
15+
"section": "Features",
16+
"hidden": false
17+
},
18+
{
19+
"type": "fix",
20+
"section": "Bug Fixes",
21+
"hidden": false
22+
},
23+
{
24+
"type": "perf",
25+
"section": "Performance Improvements",
26+
"hidden": false
27+
},
28+
{
29+
"type": "docs",
30+
"section": "Documentation",
31+
"hidden": false
32+
},
33+
{
34+
"type": "deps",
35+
"section": "Dependencies",
36+
"hidden": false
37+
},
38+
{
39+
"type": "refactor",
40+
"section": "Code Refactoring",
41+
"hidden": false
42+
},
43+
{
44+
"type": "test",
45+
"section": "Tests",
46+
"hidden": true
47+
},
48+
{
49+
"type": "tests",
50+
"section": "Tests",
51+
"hidden": true
52+
},
53+
{
54+
"type": "build",
55+
"section": "Build System",
56+
"hidden": true
57+
},
58+
{
59+
"type": "ci",
60+
"section": "Continuous Integration",
61+
"hidden": true
62+
},
63+
{
64+
"type": "chore",
65+
"section": "Miscellaneous",
66+
"hidden": true
67+
},
68+
{
69+
"type": "style",
70+
"section": "Styles",
71+
"hidden": true
72+
},
73+
{
74+
"type": "revert",
75+
"section": "Reverts",
76+
"hidden": true
77+
}
78+
]
79+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
3+
# https://github.com/wayofdev/gh-actions/blob/master/.github/workflows/create-release.yml
4+
# https://github.com/google-github-actions/release-please-action#release-types-supported
5+
# https://github.com/googleapis/release-please/blob/main/docs/customizing.md
6+
7+
on: # yamllint disable-line rule:truthy
8+
push:
9+
branches:
10+
- 1.x
11+
12+
name: 📦 Create release
13+
14+
jobs:
15+
release:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: 🎉 Create release
19+
uses: googleapis/release-please-action@v4
20+
id: release
21+
with:
22+
token: ${{ secrets.RELEASE_TOKEN }}
23+
config-file: .github/.release-please-config.json
24+
manifest-file: resources/version.json
25+
target-branch: 1.x
26+
27+
...

.github/workflows/cs-fix.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
on:
2+
push:
3+
branches:
4+
- '*'
5+
6+
name: Fix Code Style
7+
8+
jobs:
9+
cs-fix:
10+
permissions:
11+
contents: write
12+
uses: spiral/gh-actions/.github/workflows/cs-fix.yml@master
13+
env:
14+
COMPOSER_ROOT_VERSION: '1.x-dev'

.github/workflows/security.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
3+
name: 🔐 Security analysis
4+
5+
on: # yamllint disable-line rule:truthy
6+
pull_request:
7+
push:
8+
9+
jobs:
10+
security-analysis:
11+
timeout-minutes: 4
12+
runs-on: ${{ matrix.os }}
13+
concurrency:
14+
cancel-in-progress: true
15+
group: security-analysis-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
16+
strategy:
17+
fail-fast: true
18+
matrix:
19+
os:
20+
- ubuntu-latest
21+
php-version:
22+
- '8.4'
23+
dependencies:
24+
- highest
25+
steps:
26+
- name: 📦 Check out the codebase
27+
uses: actions/checkout@v6
28+
29+
- name: 🛠️ Setup PHP
30+
uses: shivammathur/setup-php@v2
31+
env:
32+
COMPOSER_ROOT_VERSION: '1.x-dev'
33+
with:
34+
php-version: ${{ matrix.php-version }}
35+
ini-values: error_reporting=E_ALL
36+
coverage: none
37+
38+
- name: 🤖 Validate composer.json and composer.lock
39+
run: composer validate --ansi --strict
40+
41+
- name: 📥 Install dependencies with composer
42+
uses: ramsey/composer-install@v3
43+
with:
44+
dependency-versions: ${{ matrix.dependencies }}
45+
46+
- name: 🐛 Check installed packages for security vulnerability advisories
47+
run: composer audit --ansi

.github/workflows/testing.yml

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
---
2+
3+
name: 🧪 Testing
4+
5+
on: # yamllint disable-line rule:truthy
6+
pull_request:
7+
branches:
8+
- 1.x
9+
push:
10+
branches:
11+
- 1.x
12+
13+
jobs:
14+
unit:
15+
name: 🧩 Unit
16+
timeout-minutes: 4
17+
runs-on: ${{ matrix.os }}
18+
concurrency:
19+
cancel-in-progress: true
20+
group: unit-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ matrix.php-version }}-${{ matrix.dependencies }}
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
os:
25+
- ubuntu-latest
26+
php-version:
27+
- '8.4'
28+
- '8.5'
29+
dependencies:
30+
# - lowest
31+
# - locked
32+
- highest
33+
steps:
34+
- name: 📦 Check out the codebase
35+
uses: actions/checkout@v6
36+
37+
- name: 🛠️ Setup PHP
38+
uses: shivammathur/setup-php@v2
39+
with:
40+
php-version: ${{ matrix.php-version }}
41+
ini-values: error_reporting=E_ALL
42+
43+
- name: 🤖 Validate composer.json and composer.lock
44+
run: composer validate --ansi --strict
45+
46+
- name: 📥 Install dependencies with composer
47+
uses: ramsey/composer-install@v3
48+
env:
49+
COMPOSER_ROOT_VERSION: '1.x-dev'
50+
with:
51+
dependency-versions: ${{ matrix.dependencies }}
52+
53+
- name: 🧪 Run unit tests
54+
run: composer test:unit
55+
56+
acceptance:
57+
name: 🛢️ Acceptance (${{ matrix.driver }})
58+
timeout-minutes: 8
59+
runs-on: ubuntu-latest
60+
concurrency:
61+
cancel-in-progress: true
62+
group: acceptance-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ matrix.php-version }}-${{ matrix.driver }}
63+
strategy:
64+
fail-fast: false
65+
matrix:
66+
php-version:
67+
- '8.4'
68+
driver:
69+
- sqlite
70+
- mysql
71+
- postgres
72+
- sqlserver
73+
74+
services:
75+
mysql:
76+
image: mysql:8.0
77+
env:
78+
MYSQL_ROOT_PASSWORD: 'YourStrong!Passw0rd'
79+
MYSQL_DATABASE: spiral
80+
ports:
81+
- 13306:3306
82+
options: >-
83+
--health-cmd="mysqladmin ping --silent"
84+
--health-interval=10s
85+
--health-timeout=5s
86+
--health-retries=10
87+
88+
postgres:
89+
image: postgres:15
90+
env:
91+
POSTGRES_PASSWORD: 'YourStrong!Passw0rd'
92+
POSTGRES_DB: spiral
93+
ports:
94+
- 15432:5432
95+
options: >-
96+
--health-cmd="pg_isready"
97+
--health-interval=10s
98+
--health-timeout=5s
99+
--health-retries=10
100+
101+
sqlserver:
102+
image: mcr.microsoft.com/mssql/server:2019-latest
103+
env:
104+
ACCEPT_EULA: 'Y'
105+
SA_PASSWORD: 'YourStrong!Passw0rd'
106+
ports:
107+
- 11433:1433
108+
options: >-
109+
--health-cmd="/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'SELECT 1' -b"
110+
--health-interval=10s
111+
--health-timeout=5s
112+
--health-retries=15
113+
114+
steps:
115+
- name: 📦 Check out the codebase
116+
uses: actions/checkout@v6
117+
118+
- name: 🛠️ Setup PHP
119+
uses: shivammathur/setup-php@v2
120+
with:
121+
php-version: ${{ matrix.php-version }}
122+
extensions: pdo, pdo_sqlite, pdo_mysql, pdo_pgsql, sqlsrv, pdo_sqlsrv
123+
ini-values: error_reporting=E_ALL
124+
125+
- name: 📥 Install dependencies with composer
126+
uses: ramsey/composer-install@v3
127+
env:
128+
COMPOSER_ROOT_VERSION: '1.x-dev'
129+
with:
130+
dependency-versions: highest
131+
132+
- name: 🧪 Run acceptance tests
133+
env:
134+
DB: ${{ matrix.driver }}
135+
MYSQL_HOST: 127.0.0.1
136+
MYSQL_PORT: 13306
137+
MYSQL_USER: root
138+
MYSQL_PASSWORD: 'YourStrong!Passw0rd'
139+
MYSQL_DATABASE: spiral
140+
POSTGRES_HOST: 127.0.0.1
141+
POSTGRES_PORT: 15432
142+
POSTGRES_USER: postgres
143+
POSTGRES_PASSWORD: 'YourStrong!Passw0rd'
144+
POSTGRES_DATABASE: spiral
145+
SQLSERVER_HOST: 127.0.0.1
146+
SQLSERVER_PORT: 11433
147+
SQLSERVER_USER: SA
148+
SQLSERVER_PASSWORD: 'YourStrong!Passw0rd'
149+
SQLSERVER_DATABASE: tempdb
150+
run: composer test:integration

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/.*/
2+
!/.github/
3+
/runtime/
4+
/vendor/
5+
/composer.lock
6+
/.env
7+
*.log

0 commit comments

Comments
 (0)