Skip to content

Commit c59071a

Browse files
authored
Merge pull request #82: Fix attributes not merged
2 parents f72839a + 47e3c88 commit c59071a

File tree

7 files changed

+428
-59
lines changed

7 files changed

+428
-59
lines changed

.github/workflows/main.yml

Lines changed: 42 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,63 @@
1-
on:
1+
---
2+
3+
name: build
4+
5+
on: # yamllint disable-line rule:truthy
26
push:
37
branches:
48
- master
59
- '*.*'
610
- '*.*.*'
711
pull_request: null
812

9-
name: build
10-
1113
jobs:
1214
test:
1315
name: Test PHP ${{ matrix.php-versions }} with Code Coverage
1416
runs-on: ubuntu-latest
1517
strategy:
1618
matrix:
17-
php-versions: ['8.0', '8.1', '8.2', '8.3']
19+
php-versions: ['8.0', '8.1', '8.2', '8.3', '8.4']
1820
steps:
19-
- name: Checkout
21+
- name: Install ODBC driver.
22+
run: |
23+
sudo curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list
24+
sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18
25+
26+
- name: 📦 Checkout
2027
uses: actions/checkout@v2
21-
- name: Setup DB services
28+
- name: 🛠️ Setup DB services
2229
run: |
2330
cd tests
2431
docker compose up -d
2532
cd ..
26-
- name: Setup PHP ${{ matrix.php-versions }}
33+
- name: 🛠️ Setup PHP ${{ matrix.php-versions }}
2734
uses: shivammathur/setup-php@v2
2835
with:
2936
php-version: ${{ matrix.php-versions }}
3037
coverage: pcov
3138
tools: pecl
3239
extensions: mbstring, pdo, pdo_sqlite, pdo_pgsql, pdo_sqlsrv, pdo_mysql
33-
- name: Get Composer Cache Directory
34-
id: composer-cache
35-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
36-
- name: Restore Composer Cache
37-
uses: actions/cache@v2
40+
41+
- name: Validate composer.json and composer.lock
42+
run: composer validate --ansi --strict
43+
44+
- name: 📥 Install dependencies with composer
45+
uses: ramsey/composer-install@v3
3846
with:
39-
path: ${{ steps.composer-cache.outputs.dir }}
40-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
41-
restore-keys: ${{ runner.os }}-composer-
42-
- name: Install dependencies with composer
43-
if: matrix.php-versions != '8.3'
44-
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
45-
- name: Install dependencies with composer php 8.3
46-
if: matrix.php-versions == '8.3'
47-
run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
48-
- name: Execute Tests
47+
dependency-versions: "highest"
48+
49+
- name: 🚀 Execute Tests
4950
run: |
5051
vendor/bin/phpunit --coverage-clover=coverage.clover
51-
- name: Upload coverage to Codecov
52+
53+
- name: 🦆 Upload coverage to Codecov
5254
continue-on-error: true # if is fork
5355
uses: codecov/codecov-action@v1
5456
with:
5557
token: ${{ secrets.CODECOV_TOKEN }}
5658
file: ./coverage.clover
57-
- name: Upload coverage to Scrutinizer
59+
60+
- name: 🦆 Upload coverage to Scrutinizer
5861
continue-on-error: true # if is fork
5962
uses: sudo-bot/action-scrutinizer@latest
6063
with:
@@ -64,32 +67,31 @@ jobs:
6467
name: SQLite PHP ${{ matrix.php-versions }}
6568
runs-on: ubuntu-latest
6669
strategy:
67-
fail-fast: false
6870
matrix:
69-
php-versions: ['8.0', '8.1']
71+
php-versions: ['8.0', '8.1', '8.2', '8.3', '8.4']
7072
steps:
71-
- name: Checkout
73+
- name: 📦 Checkout
7274
uses: actions/checkout@v2
73-
- name: Setup PHP ${{ matrix.php-versions }}
75+
- name: 🛠️ Setup PHP ${{ matrix.php-versions }}
7476
uses: shivammathur/setup-php@v2
7577
with:
7678
php-version: ${{ matrix.php-versions }}
7779
coverage: pcov
7880
tools: pecl
7981
extensions: mbstring, pdo, pdo_sqlite
80-
- name: Get Composer Cache Directory
81-
id: composer-cache
82-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
83-
- name: Restore Composer Cache
84-
uses: actions/cache@v2
82+
83+
- name: 🤖 Validate composer.json and composer.lock
84+
run: composer validate --ansi --strict
85+
86+
- name: 📥 Install dependencies with composer
87+
uses: ramsey/composer-install@v3
8588
with:
86-
path: ${{ steps.composer-cache.outputs.dir }}
87-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
88-
restore-keys: ${{ runner.os }}-composer-
89-
- name: Install Dependencies
90-
run: composer install --no-interaction --prefer-dist
91-
- name: Execute Tests
89+
dependency-versions: "highest"
90+
91+
- name: 🚀 Execute Tests
9292
env:
9393
DB: sqlite
9494
run: |
95-
vendor/bin/phpunit tests/Schema/Driver/SQLite --colors=always
95+
vendor/bin/phpunit --group driver-sqlite --colors=always
96+
97+
...

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ To test Cycle ORM Schema Builder locally, download the `cycle/schema-builder` re
1414

1515
```bash
1616
$ cd tests/
17-
$ docker-composer up
17+
$ docker compose up
1818
```
1919

2020
To run full test suite:

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"require-dev": {
3939
"phpunit/phpunit": "^9.5",
4040
"spiral/tokenizer": "^2.8",
41-
"vimeo/psalm": "^5.12",
41+
"vimeo/psalm": "^5.12 || ^6.12",
4242
"symfony/console": "^6.0 || ^7.0",
4343
"spiral/code-style": "^2.2"
4444
},

0 commit comments

Comments
 (0)