Skip to content

Commit a203028

Browse files
authored
Merge pull request #198 from cycle/feat/dx-infra-3
2 parents 2e5d256 + 726a0fe commit a203028

6 files changed

Lines changed: 5775 additions & 40 deletions

File tree

.github/workflows/apply-labels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ name: 🏷️ Add labels
1414

1515
jobs:
1616
label:
17-
uses: wayofdev/gh-actions/.github/workflows/apply-labels.yml@master
17+
uses: cycle/gh-actions/.github/workflows/apply-labels.yml@v4.0.0
1818
with:
1919
os: ubuntu-latest
2020
secrets:

.github/workflows/ci.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,64 @@ jobs:
2626
failOnErrors: false
2727
helpURL: 'https://github.com/conventional-changelog/commitlint/#what-is-commitlint'
2828

29+
coding-standards:
30+
timeout-minutes: 4
31+
runs-on: ${{ matrix.os }}
32+
concurrency:
33+
cancel-in-progress: true
34+
group: coding-standards-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
35+
strategy:
36+
fail-fast: true
37+
matrix:
38+
os:
39+
- ubuntu-latest
40+
php-version:
41+
- '8.2'
42+
dependencies:
43+
- locked
44+
45+
steps:
46+
- name: 📦 Check out the codebase
47+
uses: actions/checkout@v4.1.1
48+
49+
- name: 🧐 Lint YAML files
50+
uses: ibiqlik/action-yamllint@v3.1.1
51+
with:
52+
config_file: .yamllint.yaml
53+
file_or_dir: '.'
54+
strict: true
55+
56+
- name: 🛠️ Setup PHP
57+
uses: shivammathur/setup-php@2.30.2
58+
with:
59+
php-version: ${{ matrix.php-version }}
60+
extensions: mbstring, pdo, pdo_sqlite
61+
ini-values: error_reporting=E_ALL
62+
coverage: xdebug
63+
64+
- name: 🛠️ Setup problem matchers
65+
run: |
66+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
67+
68+
- name: 🤖 Validate composer.json and composer.lock
69+
run: composer validate --ansi --strict
70+
71+
- name: 🔍 Get composer cache directory
72+
uses: cycle/gh-actions/actions/composer/get-cache-directory@v4.0.0
73+
74+
- name: ♻️ Restore cached dependencies installed with composer
75+
uses: actions/cache@v4.0.2
76+
with:
77+
path: ${{ env.COMPOSER_CACHE_DIR }}
78+
key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}
79+
restore-keys: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
80+
81+
- name: 📥 Install "${{ matrix.dependencies }}" dependencies
82+
uses: cycle/gh-actions/actions/composer/install@v4.0.0
83+
with:
84+
dependencies: ${{ matrix.dependencies }}
85+
86+
- name: 🔍 Run composer-normalize
87+
run: composer normalize --ansi --dry-run
88+
2989
...

.github/workflows/create-release.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22

3-
# https://github.com/wayofdev/gh-actions/blob/master/.github/workflows/create-release.yml
43
# https://github.com/google-github-actions/release-please-action#release-types-supported
54
# https://github.com/googleapis/release-please/blob/main/docs/customizing.md
65

@@ -16,7 +15,7 @@ jobs:
1615
runs-on: ubuntu-latest
1716
steps:
1817
- name: 🎉 Create release
19-
uses: google-github-actions/release-please-action@v4
18+
uses: google-github-actions/release-please-action@v4.1.0
2019
id: release
2120
with:
2221
token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.idea/
22
.env
33
.coveralls.yml
4-
composer.lock
54
vendor/
65
tests/runtime/*
76
build/logs/*

composer.json

Lines changed: 48 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,18 @@
11
{
22
"name": "cycle/database",
3-
"type": "library",
43
"description": "DBAL, schema introspection, migration and pagination",
5-
"keywords": ["dbal", "database", "mysql", "mssql", "sqlite", "postgresql", "orm", "sql", "query-builder"],
64
"license": "MIT",
7-
"conflict": {
8-
"spiral/database": "*"
9-
},
10-
"homepage": "https://cycle-orm.dev",
11-
"support": {
12-
"issues": "https://github.com/cycle/database/issues",
13-
"source": "https://github.com/cycle/database",
14-
"docs": "https://cycle-orm.dev/docs",
15-
"chat": "https://discord.gg/spiralphp"
16-
},
17-
"funding": [
18-
{
19-
"type": "github",
20-
"url": "https://github.com/sponsors/cycle"
21-
}
5+
"type": "library",
6+
"keywords": [
7+
"dbal",
8+
"database",
9+
"mysql",
10+
"mssql",
11+
"sqlite",
12+
"postgresql",
13+
"orm",
14+
"sql",
15+
"query-builder"
2216
],
2317
"authors": [
2418
{
@@ -38,6 +32,19 @@
3832
"email": "pavel.buchnev@spiralscout.com"
3933
}
4034
],
35+
"homepage": "https://cycle-orm.dev",
36+
"support": {
37+
"issues": "https://github.com/cycle/database/issues",
38+
"chat": "https://discord.gg/spiralphp",
39+
"source": "https://github.com/cycle/database",
40+
"docs": "https://cycle-orm.dev/docs"
41+
},
42+
"funding": [
43+
{
44+
"type": "github",
45+
"url": "https://github.com/sponsors/cycle"
46+
}
47+
],
4148
"require": {
4249
"php": ">=8.0",
4350
"ext-pdo": "*",
@@ -46,40 +53,45 @@
4653
"spiral/pagination": "^2.8 || ^3.0",
4754
"symfony/polyfill-php83": "^1.28"
4855
},
49-
"autoload": {
50-
"files": [
51-
"src/polyfill.php",
52-
"src/functions_polyfill.php"
53-
],
54-
"psr-4": {
55-
"Cycle\\Database\\": "src"
56-
}
57-
},
5856
"require-dev": {
57+
"ergebnis/composer-normalize": "^2.42",
5958
"infection/infection": "^0.26.10",
6059
"mockery/mockery": "^1.5",
6160
"phpunit/phpunit": "^9.5",
62-
"spiral/tokenizer": "^2.14 | ^3.0",
61+
"spiral/tokenizer": "^2.14 || ^3.0",
6362
"vimeo/psalm": "^5.18"
6463
},
64+
"conflict": {
65+
"spiral/database": "*"
66+
},
67+
"minimum-stability": "dev",
68+
"prefer-stable": true,
69+
"autoload": {
70+
"psr-4": {
71+
"Cycle\\Database\\": "src"
72+
},
73+
"files": [
74+
"src/polyfill.php",
75+
"src/functions_polyfill.php"
76+
]
77+
},
6578
"autoload-dev": {
6679
"psr-4": {
6780
"Cycle\\Database\\Tests\\": "tests/Database"
6881
}
6982
},
83+
"config": {
84+
"allow-plugins": {
85+
"ergebnis/composer-normalize": true,
86+
"infection/extension-installer": true
87+
},
88+
"sort-packages": true
89+
},
7090
"scripts": {
7191
"test": [
7292
"phpcs --standard=phpcs.xml",
7393
"psalm --no-cache",
7494
"phpunit"
7595
]
76-
},
77-
"config": {
78-
"sort-packages": true,
79-
"allow-plugins": {
80-
"infection/extension-installer": true
81-
}
82-
},
83-
"minimum-stability": "dev",
84-
"prefer-stable": true
96+
}
8597
}

0 commit comments

Comments
 (0)