Skip to content

Commit 4c820d9

Browse files
committed
validate database schema GHA
Signed-off-by: alexmerlin <[email protected]>
1 parent 4f68282 commit 4c820d9

File tree

1 file changed

+48
-54
lines changed

1 file changed

+48
-54
lines changed
Lines changed: 48 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,48 @@
1-
on:
2-
- push
3-
4-
name: Validate database schema
5-
6-
jobs:
7-
code-coverage:
8-
name: Code Coverage
9-
10-
runs-on: ${{ matrix.os }}
11-
12-
strategy:
13-
matrix:
14-
os:
15-
- ubuntu-latest
16-
17-
php:
18-
- "8.2"
19-
- "8.3"
20-
21-
steps:
22-
- name: Checkout
23-
uses: actions/checkout@v4
24-
25-
- name: Install PHP
26-
uses: shivammathur/setup-php@v2
27-
with:
28-
php-version: "${{ matrix.php }}"
29-
coverage: pcov
30-
ini-values: assert.exception=1, zend.assertions=1, error_reporting=-1, log_errors_max_len=0, display_errors=On
31-
tools: composer:v2, cs2pr
32-
33-
- name: Determine composer cache directory
34-
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
35-
36-
- name: Cache dependencies installed with composer
37-
uses: actions/cache@v4
38-
with:
39-
path: ${{ env.COMPOSER_CACHE_DIR }}
40-
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
41-
restore-keys: |
42-
php${{ matrix.php }}-composer-
43-
44-
- name: Install dependencies with composer
45-
run: composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
46-
47-
- name: Setup project
48-
run: |
49-
cp config/autoload/local.php.dist config/autoload/local.php
50-
cp config/autoload/mail.local.php.dist config/autoload/mail.local.php
51-
cp config/autoload/local.test.php.dist config/autoload/local.test.php
52-
53-
- name: Validate database schema
54-
run: php bin/doctrine orm:validate-schema --skip-sync
1+
on:
2+
- push
3+
4+
name: Validate database schema
5+
6+
jobs:
7+
code-coverage:
8+
name: Code Coverage
9+
10+
runs-on: ${{ matrix.os }}
11+
12+
strategy:
13+
matrix:
14+
os:
15+
- ubuntu-latest
16+
17+
php:
18+
- "8.2"
19+
- "8.3"
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Install PHP
26+
uses: shivammathur/setup-php@v2
27+
with:
28+
php-version: "${{ matrix.php }}"
29+
coverage: pcov
30+
ini-values: assert.exception=1, zend.assertions=1, error_reporting=-1, log_errors_max_len=0, display_errors=On
31+
tools: composer:v2, cs2pr
32+
33+
- name: Determine composer cache directory
34+
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
35+
36+
- name: Cache dependencies installed with composer
37+
uses: actions/cache@v4
38+
with:
39+
path: ${{ env.COMPOSER_CACHE_DIR }}
40+
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
41+
restore-keys: |
42+
php${{ matrix.php }}-composer-
43+
44+
- name: Install dependencies with composer
45+
run: composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
46+
47+
- name: Validate database schema
48+
run: php bin/doctrine orm:validate-schema --skip-sync

0 commit comments

Comments
 (0)