-
Notifications
You must be signed in to change notification settings - Fork 2
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
3 changed files
with
134 additions
and
0 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,79 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [ master, develop ] | ||
|
||
jobs: | ||
run: | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: | ||
- '7.4' | ||
- '8.0' | ||
coverage: ['none'] | ||
symfony-versions: | ||
- '4.4.*' | ||
- '5.1.*' | ||
- '5.2.*' | ||
- '5.3.*' | ||
include: | ||
- description: 'Log Code Coverage' | ||
php: '8.0' | ||
coverage: 'xdebug' | ||
symfony-versions: '^5.2' | ||
|
||
name: PHP ${{ matrix.php }} Symfony ${{ matrix.symfony-versions }} ${{ matrix.description }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/.composer/cache/files | ||
key: ${{ matrix.php }}-${{ matrix.symfony-versions }} | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
coverage: ${{ matrix.coverage }} | ||
|
||
- name: Add PHPUnit matcher | ||
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | ||
|
||
- name: Set composer cache directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Cache composer | ||
uses: actions/[email protected] | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-${{ matrix.php }}-${{ matrix.symfony-versions }}-composer-${{ hashFiles('composer.json') }} | ||
restore-keys: ${{ runner.os }}-${{ matrix.php }}-${{ matrix.symfony-versions }}-composer | ||
|
||
- name: Install dependencies | ||
run: composer require "symfony/symfony:${{ matrix.symfony-versions }}" --no-update | ||
|
||
- name: Install dependencies | ||
run: composer install | ||
|
||
- name: Run PHPUnit tests | ||
run: vendor/bin/simple-phpunit | ||
if: matrix.coverage == 'none' | ||
|
||
- name: PHPUnit tests and Log Code coverage | ||
run: vendor/bin/simple-phpunit --coverage-clover=coverage.xml | ||
if: matrix.coverage == 'xdebug' | ||
|
||
#TODO: need public release | ||
# - name: Run codecov | ||
# uses: codecov/codecov-action@v1 | ||
# if: matrix.coverage == 'xdebug' | ||
# with: | ||
# file: './coverage.xml' | ||
# fail_ci_if_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: gitleaks | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [ master, develop ] | ||
|
||
jobs: | ||
gitleaks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
|
||
- name: Run gitleaks | ||
uses: zricethezav/gitleaks-action@master |
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,39 @@ | ||
name: Code style and static analysis | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [ master, develop ] | ||
|
||
jobs: | ||
php-cs-fixer: | ||
name: PHP-CS-Fixer | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
|
||
- name: Install dependencies | ||
run: composer install --no-progress --no-interaction --prefer-dist | ||
|
||
- name: Run script | ||
run: vendor/bin/phpcs | ||
|
||
phpstan: | ||
name: PHPStan | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
|
||
- name: Install dependencies | ||
run: composer install --no-progress --no-interaction --prefer-dist | ||
|
||
- name: Run script | ||
run: vendor/bin/phpstan analyse |