-
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.
- Loading branch information
1 parent
10d2759
commit 2d2687a
Showing
3 changed files
with
74 additions
and
39 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,73 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
pull_request_target: | ||
pull_request: | ||
|
||
jobs: | ||
php-cs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
name: Checkout repository | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.0' | ||
|
||
- uses: ramsey/composer-install@v1 | ||
with: | ||
dependency-versions: 'highest' | ||
|
||
- name: Static Code Analysis | ||
run: composer lint | ||
|
||
test: | ||
runs-on: ${{ matrix.operating-system }} | ||
needs: | ||
- php-cs | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
operating-system: [ ubuntu-latest ] | ||
php: [ '7.2', '7.3', '7.4', '8.0' ] | ||
dependencies: [ 'lowest', 'highest' ] | ||
|
||
name: PHP ${{ matrix.php }} on ${{ matrix.operating-system }} with ${{ matrix.dependencies }} dependencies | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
name: Checkout repository | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.composer/cache/files | ||
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
coverage: pcov | ||
|
||
- name: Composer install | ||
uses: ramsey/composer-install@v1 | ||
with: | ||
dependency-versions: ${{ matrix.dependencies }} | ||
composer-options: ${{ matrix.composer-options }} | ||
|
||
- name: PHPUnit + Code coverage | ||
run: | | ||
mkdir -p build/logs | ||
vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml | ||
- name: Code coverage upload to Coveralls | ||
if: matrix.php == '8.0' && matrix.dependencies == 'highest' | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
composer require php-coveralls/php-coveralls | ||
vendor/bin/php-coveralls -v --coverage_clover=build/logs/clover.xml |
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