-
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.
* Add support for PHP 8.0 * Update github actions cache name * Delete Travis CI configuration
- Loading branch information
1 parent
06e30ba
commit 0185e86
Showing
4 changed files
with
107 additions
and
44 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,100 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- release/* | ||
- issue-* | ||
pull_request: | ||
branches: | ||
- master | ||
schedule: | ||
- cron: 0 7 * * 1 | ||
|
||
jobs: | ||
analysis: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
php: [7.4] | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Cache composer dependencies | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: laravel-varnishable-composer-cache | ||
with: | ||
path: ~/.composer | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick | ||
coverage: none | ||
- name: Install composer dependencies | ||
run: composer install --prefer-dist | ||
- name: Run phpstan analysis | ||
run: composer phpstan-analysis | ||
- name: Run phpmd analysis | ||
run: composer phpmd-analysis | ||
- name: Run phpcpd analysis | ||
run: vendor/bin/phpcpd --min-lines=3 --min-tokens=36 src/ | ||
phpunit: | ||
needs: [analysis] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
php: [7.3, 7.4, 8.0] | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick | ||
coverage: none | ||
- name: Remove some dev dependencies | ||
run: composer remove "ekino/phpstan-banned-code" "nunomaduro/larastan" "phpmd/phpmd" "phpstan/phpstan-deprecation-rules" "sebastian/phpcpd" --dev --no-update | ||
- name: Install composer dependencies | ||
run: composer install --prefer-dist | ||
- name: Run the test suite | ||
run: phpdbg -qrr -dmemory_limit=3G vendor/bin/phpunit | ||
phpunit-cov: | ||
needs: [ analysis ] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
php: [ 7.4 ] | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Cache composer dependencies | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: laravel-varnishable-composer-cache | ||
with: | ||
path: ~/.composer | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick | ||
coverage: none | ||
- name: Install composer dependencies | ||
run: composer install --prefer-dist | ||
- name: Run the Coverage test suite | ||
run: phpdbg -qrr -dmemory_limit=3G vendor/bin/phpunit --coverage-clover=clover.xml | ||
- name: Upload test coverage report to codecov.io | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
run: bash <(curl -s https://codecov.io/bash) |
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