-
Notifications
You must be signed in to change notification settings - Fork 1
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
16 changed files
with
3,668 additions
and
2,419 deletions.
There are no files selected for viewing
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,146 @@ | ||
name: Gunther workflow | ||
|
||
on: [push] | ||
|
||
jobs: | ||
tests: | ||
runs-on: ${{ matrix.operating-system }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
operating-system: [ubuntu-latest] | ||
php-version: ['7.3', '7.4'] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- name: Setup PHP ${{ matrix.php-version }} | ||
uses: shivammathur/setup-php@master | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
coverage: none | ||
- name: Check PHP Version | ||
run: php -v | ||
- name: Check Composer Version | ||
run: composer -V | ||
- name: Check PHP Extensions | ||
run: php -m | ||
|
||
- name: Validate composer.json and composer.lock | ||
run: composer validate | ||
|
||
- name: Get Composer Cache Directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
- name: Cache composer files | ||
uses: actions/cache@v1 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
${{ runner.os }}-composer- | ||
- name: Install dependencies | ||
run: composer install --no-interaction --no-suggest --ignore-platform-reqs | ||
|
||
- name: Run test suite | ||
run: phpdbg -dmemory_limit=4G -qrr vendor/bin/phpunit -c phpunit.xml --log-junit ./results/junit/results.xml --coverage-clover ./results/coverage.xml | ||
|
||
- name: Store results | ||
if: matrix.php-version == '7.3' && matrix.operating-system == 'ubuntu-latest' | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: results | ||
path: results | ||
|
||
psalm: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
php-version: ['7.3'] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- name: Setup PHP ${{ matrix.php-version }} | ||
uses: shivammathur/setup-php@master | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
coverage: none | ||
|
||
- name: Get Composer Cache Directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
- name: Cache composer files | ||
uses: actions/cache@v1 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
${{ runner.os }}-composer- | ||
- name: Install dependencies | ||
run: composer install --no-interaction --no-suggest --ignore-platform-reqs | ||
|
||
- name: Run psalm | ||
run: vendor/bin/psalm --output-format=github --shepherd | ||
|
||
phpstan: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
php-version: ['7.3'] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- name: Setup PHP ${{ matrix.php-version }} | ||
uses: shivammathur/setup-php@master | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
coverage: none | ||
|
||
- name: Get Composer Cache Directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
- name: Cache composer files | ||
uses: actions/cache@v1 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
${{ runner.os }}-composer- | ||
- name: Install dependencies | ||
run: composer install --no-interaction --no-suggest --ignore-platform-reqs | ||
|
||
- name: Run phpstan | ||
run: vendor/bin/phpstan analyse src | ||
|
||
reporting: | ||
needs: tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
php-version: ['7.3'] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- name: Download results | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: results | ||
|
||
- name: Fix coverage | ||
run: sed -i -e "s%$GITHUB_WORKSPACE/%%g" results/coverage.xml | ||
|
||
- name: SonarCloud Scan | ||
uses: SonarSource/sonarcloud-github-action@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
|
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.