-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #417 from craue/gha
migrate from Travis CI to GitHub Actions
- Loading branch information
Showing
42 changed files
with
420 additions
and
274 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 |
---|---|---|
@@ -1,8 +1,7 @@ | ||
/Tests export-ignore | ||
/.gitattributes export-ignore | ||
/.github export-ignore | ||
/.gitignore export-ignore | ||
/.travis_install_dependencies.sh export-ignore | ||
/.travis.yml export-ignore | ||
/phpstan-config.neon export-ignore | ||
/phpstan.neon.dist export-ignore | ||
/phpunit.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,31 @@ | ||
name: Composer Lint | ||
|
||
on: | ||
pull_request: ~ | ||
push: ~ | ||
|
||
jobs: | ||
composer-lint: | ||
name: Composer Lint | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
php: | ||
- '8.2' | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
coverage: none | ||
tools: composer:v2, composer-normalize:2 | ||
env: | ||
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: run composer-normalize | ||
run: composer-normalize --dry-run |
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,31 @@ | ||
name: Static Analysis | ||
|
||
on: | ||
pull_request: ~ | ||
push: ~ | ||
|
||
jobs: | ||
static-analysis-phpstan: | ||
name: Static Analysis with PHPStan | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
php: | ||
- '8.2' | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
coverage: none | ||
|
||
- name: install dependencies with Composer | ||
uses: ramsey/composer-install@v2 | ||
|
||
- name: run PHPStan | ||
run: vendor/bin/phpstan analyse |
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,106 @@ | ||
name: Tests | ||
|
||
on: | ||
pull_request: ~ | ||
push: ~ | ||
|
||
concurrency: | ||
group: ${{ github.workflow }} @ ${{ github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
tests: | ||
name: PHP ${{ matrix.php }} - ${{ matrix.dependencies || format('Symfony {0}', matrix.symfony) }}${{ (matrix.note && format(' ({0})', matrix.note)) || '' }}${{ (matrix.allow-failure && ' 🔕') || '' }} | ||
runs-on: ubuntu-latest | ||
continue-on-error: ${{ matrix.allow-failure || false }} | ||
env: | ||
SYMFONY_REQUIRE: ${{ matrix.symfony }} | ||
SYMFONY_DEPRECATIONS_HELPER: ${{ matrix.symfony-deprecations }} | ||
PARAM_DB_DRIVER: ${{ matrix.db-driver }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- | ||
php: '7.3' | ||
dependencies: lowest | ||
- | ||
php: '8.2' | ||
dependencies: highest | ||
symfony-deprecations: max[indirect]=5722 | ||
- | ||
php: '7.3' | ||
symfony: '4.4.*' | ||
- | ||
php: '7.3' | ||
symfony: '4.4.*' | ||
note: sqlite | ||
db-driver: pdo_sqlite | ||
- | ||
php: '7.4' | ||
symfony: '5.4.*' | ||
# TODO remove as soon as Symfony >= 5.0 is required | ||
- | ||
php: '7.4' | ||
symfony: '5.4.*' | ||
note: contao-polyfill-symfony | ||
contao-polyfill-symfony: true | ||
- | ||
php: '8.0' | ||
symfony: '5.4.*' | ||
- | ||
php: '8.1' | ||
symfony: '5.4.*' | ||
- | ||
php: '8.1' | ||
symfony: '6.3.*' | ||
symfony-deprecations: max[indirect]=5722 | ||
- | ||
php: '8.2' | ||
symfony: '6.4.*' | ||
stability: dev | ||
allow-failure: true | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: mysql, redis | ||
coverage: pcov | ||
ini-values: memory_limit=-1 | ||
tools: flex | ||
env: | ||
fail-fast: true # interrupt on extension setup error | ||
|
||
# TODO remove as soon as Symfony >= 5.0 is required | ||
- name: require contao/polyfill-symfony | ||
if: matrix.contao-polyfill-symfony == true | ||
run: composer require --no-update --dev contao/polyfill-symfony | ||
|
||
- name: use dev dependencies | ||
if: matrix.stability == 'dev' | ||
run: composer config minimum-stability dev | ||
|
||
- name: install dependencies with Composer | ||
uses: ramsey/composer-install@v2 | ||
with: | ||
dependency-versions: ${{ matrix.dependencies }} | ||
composer-options: --prefer-dist | ||
|
||
- name: run PHPUnit | ||
run: vendor/bin/phpunit -v --coverage-clover build/logs/clover.xml | ||
|
||
- name: upload code coverage data | ||
if: github.repository == 'craue/CraueFormFlowBundle' | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
COVERALLS_FLAG_NAME: PHP ${{ matrix.php }} - ${{ matrix.dependencies || format('Symfony {0}', matrix.symfony) }}${{ (matrix.note && format(' ({0})', matrix.note)) || '' }} | ||
run: | | ||
unset SYMFONY_REQUIRE | ||
composer global require php-coveralls/php-coveralls | ||
php-coveralls --coverage_clover=build/logs/clover.xml -v |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
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
Oops, something went wrong.