forked from propelorm/Propel2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into pr-1470
# Conflicts: # tests/Propel/Tests/Generator/Builder/Om/GeneratedObjectTest.php
- Loading branch information
Showing
671 changed files
with
37,079 additions
and
18,031 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
; This file is for unifying the coding style for different editors and IDEs. | ||
; More information at https://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.bat] | ||
end_of_line = crlf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Define the line ending behavior of the different file extensions | ||
# Set the default behavior, in case people don't have core.autocrlf set. | ||
* text text=auto eol=lf | ||
|
||
# Declare files that will always have CRLF line endings on checkout. | ||
*.bat eol=crlf | ||
|
||
# Denote all files that are truly binary and should not be modified. | ||
*.png binary | ||
*.jpg binary | ||
*.gif binary | ||
*.jpeg binary | ||
*.zip binary | ||
*.phar binary | ||
*.ttf binary | ||
*.woff binary | ||
*.eot binary | ||
*.ico binary | ||
*.mo binary | ||
*.pdf binary | ||
*.xcf binary | ||
*.eps binary | ||
*.psd binary | ||
*.doc binary | ||
|
||
# Remove files for archives generated using `git archive` | ||
phpstan.neon export-ignore | ||
phpstan-baseline.neon export-ignore linguist-generated=true | ||
.travis.yml export-ignore | ||
.editorconfig export-ignore | ||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
.license export-ignore | ||
phpunit.xml.dist export-ignore | ||
pom.xml.dist export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,164 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
branches: | ||
- master | ||
|
||
jobs: | ||
testsuite: | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-version: [ '7.2', '7.4', '8.0' ] | ||
db-type: [ sqlite, mysql, pgsql, agnostic ] | ||
symfony-version: [ '3-min', '3-max', '4-min', '4-max', '5-min', '5-max' ] | ||
exclude: | ||
- php-version: '8.0' | ||
symfony-version: '4-min' | ||
steps: | ||
- name: Install PostgreSQL latest | ||
if: matrix.db-type == 'pgsql' && matrix.php-version != '7.2' | ||
uses: CasperWA/[email protected] | ||
with: | ||
postgresql db: 'propel-tests' | ||
postgresql user: 'postgres' | ||
postgresql password: 'postgres' | ||
|
||
- name: Install PostgreSQL min | ||
if: matrix.db-type == 'pgsql' && matrix.php-version == '7.2' | ||
uses: CasperWA/[email protected] | ||
with: | ||
postgresql version: 9 | ||
postgresql db: 'propel-tests' | ||
postgresql user: 'postgres' | ||
postgresql password: 'postgres' | ||
|
||
- name: Install MariaDb latest | ||
if: matrix.db-type == 'mysql' && matrix.php-version != '7.2' | ||
uses: getong/[email protected] | ||
|
||
- name: Install MariaDb min | ||
if: matrix.db-type == 'mysql' && matrix.php-version == '7.2' | ||
uses: getong/[email protected] | ||
with: | ||
mariadb version: '10.2' | ||
|
||
- name: Setup PHP, with composer and extensions | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
extensions: json, libxml, pdo, pdo_mysql, pdo_sqlite, pdo_pgsql, sqlite3 | ||
coverage: pcov | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Composer get cache directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Composer cache dependencies | ||
uses: actions/cache@v1 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: ${{ runner.os }}-composer- | ||
|
||
- name: Move specific composer.json (Symfony version ${{ matrix.symfony-version }}) | ||
run: mv tests/composer/composer-symfony${{ matrix.symfony-version }}.json composer.json | ||
|
||
- name: Composer install (Symfony version ${{ matrix.symfony-version }}) | ||
run: composer install --no-progress --prefer-dist --optimize-autoloader | ||
|
||
- name: Setup Postgresql database for test suite | ||
if: matrix.db-type == 'pgsql' | ||
run: tests/bin/setup.pgsql.sh | ||
env: | ||
PGPASSWORD: 'postgres' | ||
DB_NAME: 'propel-tests' | ||
DB_USER: 'postgres' | ||
DB_PW: 'postgres' | ||
|
||
- name: Setup the database for test suite | ||
if: matrix.db-type != 'agnostic' && matrix.db-type != 'pgsql' | ||
run: tests/bin/setup.${{ matrix.db-type }}.sh | ||
|
||
- name: Run PostgreSQL tests | ||
if: matrix.db-type == 'pgsql' | ||
shell: 'script -q -e -c "bash {0}"' | ||
run: | | ||
if [[ ${{ matrix.php-version }} == '7.4' && ${{ matrix.symfony-version == '5-max' }} ]]; then | ||
export CODECOVERAGE=1 && vendor/bin/phpunit -c tests/pgsql.phpunit.xml --verbose --coverage-clover=tests/coverage.xml | ||
else | ||
vendor/bin/phpunit -c tests/pgsql.phpunit.xml | ||
fi | ||
env: | ||
DB_NAME: 'propel-tests' | ||
DB_USER: 'postgres' | ||
DB_PW: 'postgres' | ||
|
||
- name: Run ${{ matrix.db-type }} tests | ||
if: matrix.db-type != 'pgsql' | ||
shell: 'script -q -e -c "bash {0}"' | ||
run: | | ||
if [[ ${{ matrix.php-version }} == '7.4' && ${{ matrix.symfony-version == '5-max' }} ]]; then | ||
export CODECOVERAGE=1 && vendor/bin/phpunit -c tests/${{ matrix.db-type }}.phpunit.xml --verbose --coverage-clover=tests/coverage.xml | ||
else | ||
vendor/bin/phpunit -c tests/${{ matrix.db-type }}.phpunit.xml | ||
fi | ||
- name: Code Coverage Report | ||
if: success() && matrix.php-version == '7.4' && matrix.symfony-version == '5-max' | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
flags: ${{ matrix.php-version }}, ${{ matrix.db-type }}, ${{ matrix.symfony-version }} | ||
file: tests/coverage.xml | ||
|
||
code-style-and-static-analysis: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- name: Setup PHP 7.4 | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 7.4 | ||
extensions: json, libxml, pdo, pdo_mysql, pdo_sqlite, pdo_pgsql, sqlite3 | ||
coverage: pcov | ||
|
||
- uses: actions/checkout@v1 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Composer get cache directory | ||
id: composer-cache | ||
run: | | ||
echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
- name: Composer cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
- name: Composer validate | ||
run: composer validate | ||
|
||
- name: Composer install | ||
run: composer install --prefer-dist --no-interaction | ||
|
||
- name: Code Style | ||
run: composer cs-check | ||
|
||
- name: PHPStan | ||
run: composer stan | ||
|
||
- name: Psalm | ||
run: composer psalm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/** | ||
* MIT License. This file is part of the Propel package. | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ |
Oops, something went wrong.