-
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restructure the GitHub Action setup to include automatic code-style-f…
…ix (#172) * Restructure the GitHub Action setup including auto cs-fix * Use same format for all workflow files * Add (not activated) GitHub Funding file
- Loading branch information
Showing
5 changed files
with
103 additions
and
74 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,2 @@ | ||
# These are supported funding model platforms | ||
tidelift: "packagist/cypresslab/gitelephant" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Code Style Check | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
code_style: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: shivammathur/setup-php@v1 | ||
with: | ||
php-version: 7.3 | ||
coverage: none # disable xdebug, pcov | ||
- run: composer install --no-progress | ||
# fix code style, automatically | ||
- run: composer fix-cs | ||
# push changes back | ||
# note that this might not work with PRs from forks: | ||
# https://github.com/stefanzweifel/git-auto-commit-action/issues/25 | ||
- uses: stefanzweifel/[email protected] | ||
with: | ||
commit_message: Automatic Fix of Code Style | ||
branch: ${{ github.head_ref }} | ||
|
||
# check if some unfixable code style issues remain | ||
- run: composer check-cs |
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,19 @@ | ||
name: Static Tests | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
static_tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: shivammathur/setup-php@v1 | ||
with: | ||
php-version: 7.3 | ||
coverage: none # disable xdebug, pcov | ||
- run: composer install --no-progress | ||
- run: ./vendor/bin/phpstan analyse -c phpstan.neon |
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,52 @@ | ||
name: Tests | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
php: | ||
- "7.2" | ||
- "7.3" | ||
- "7.4" | ||
symfony: | ||
- 3.* | ||
- 4.* | ||
- 5.* | ||
dependency-version: | ||
# - prefer-lowest | ||
- prefer-stable | ||
|
||
name: PHP ${{ matrix.php }} - S ${{ matrix.symfony }} - ${{ matrix.dependency-version }} - tests | ||
steps: | ||
# basically git clone | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Git | ||
run: | | ||
git --version | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GitHub Action" | ||
git --version | ||
- name: Setup PHP | ||
# use PHP of specific version | ||
uses: shivammathur/setup-php@v1 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
coverage: none # disable xdebug, pcov | ||
tools: composer | ||
|
||
- name: Install Composer Dependencies | ||
run: | | ||
composer require "symfony/process:${{ matrix.symfony }}" "symfony/filesystem:${{ matrix.symfony }}" "symfony/finder:${{ matrix.symfony }}" --no-interaction --no-update | ||
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest | ||
- name: Run PHPUnit Tests | ||
run: composer tests |