-
Notifications
You must be signed in to change notification settings - Fork 7
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
Showing
2 changed files
with
35 additions
and
35 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,63 +1,56 @@ | ||
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions | ||
|
||
on: | ||
- pull_request | ||
- push | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
name: "Continuous Integration" | ||
|
||
jobs: | ||
run: | ||
name: "Grumphp" | ||
supported-versions-matrix: | ||
name: Supported Versions Matrix | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.supported-versions-matrix.outputs.version }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- id: supported-versions-matrix | ||
uses: WyriHaximus/github-action-composer-php-versions-in-range@v1 | ||
tests: | ||
name: "Unit Tests" | ||
runs-on: ${{ matrix.operating-system }} | ||
needs: | ||
- supported-versions-matrix | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
operating-system: [ubuntu-latest, windows-latest, macOS-latest] | ||
php-versions: ['7.4', '8.1'] | ||
|
||
php: ${{ fromJson(needs.supported-versions-matrix.outputs.version) }} | ||
steps: | ||
- name: Set git to use LF | ||
run: | | ||
git config --global core.autocrlf false | ||
git config --global core.eol lf | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
with: | ||
fetch-depth: 1 | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install PHP | ||
uses: shivammathur/setup-php@master | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: xdebug,mbstring | ||
|
||
- name: Get Composer Cache Directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v3.0.5 | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: ${{ runner.os }}-composer- | ||
php-version: ${{ matrix.php }} | ||
coverage: pcov | ||
|
||
- name: Install dependencies | ||
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader | ||
uses: ramsey/composer-install@v2 | ||
|
||
- name: Run Grumphp | ||
run: vendor/bin/grumphp run | ||
env: | ||
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} | ||
|
||
- name: Send PSALM data | ||
run: vendor/bin/psalm --shepherd --stats src/ | ||
continue-on-error: true | ||
|
||
- name: Send Scrutinizer data | ||
run: | | ||
wget https://scrutinizer-ci.com/ocular.phar | ||
php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml | ||
composer require scrutinizer/ocular --dev | ||
vendor/bin/ocular code-coverage:upload --format=php-clover build/logs/coverage/clover.xml | ||
continue-on-error: true |
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