Merge pull request #255 from payplug/release-1.9.3 #102
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
name: Analysis | |
'on': | |
push: | |
branches: | |
- develop | |
- qa | |
- master | |
paths-ignore: | |
- README.md | |
pull_request: | |
paths-ignore: | |
- README.md | |
jobs: | |
analysis: | |
name: 'PHP ${{ matrix.php }} Symfony ${{ matrix.symfony }}' | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php: | |
- 8.2 | |
symfony: | |
- '6.2.*' | |
env: | |
APP_ENV: test | |
steps: | |
- | |
uses: actions/checkout@v2 | |
- | |
name: 'Setup PHP' | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '${{ matrix.php }}' | |
tools: symfony | |
coverage: none | |
- | |
name: 'Composer - Get Cache Directory' | |
id: composer-cache | |
run: 'echo "::set-output name=dir::$(composer config cache-files-dir)"' | |
- | |
name: 'Composer - Set cache' | |
uses: actions/cache@v2 | |
with: | |
path: '${{ steps.composer-cache.outputs.dir }}' | |
key: 'php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-composer-${{ hashFiles(''**/composer.json'') }}' | |
restore-keys: "php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-composer-\n" | |
- | |
name: 'Composer - Validate composer.json and composer.lock' | |
run: 'composer validate --strict' | |
- | |
name: 'Composer - Github Auth' | |
run: 'composer config -g github-oauth.github.com ${{ github.token }}' | |
- | |
name: 'Composer - Restrict Symfony version' | |
run: 'composer config extra.symfony.require "${{ matrix.symfony }}"' | |
- | |
name: 'Composer - Update dependencies' | |
run: 'composer update --no-progress' | |
id: end-of-setup | |
- | |
name: 'PHPStan - Run' | |
run: 'if [ -f rulesets/phpstan.neon ]; then vendor/bin/phpstan analyse -c rulesets/phpstan.neon src/ ; else echo PHPStan rulesets file does not exist, skipping step ; fi' | |
if: 'always() && steps.end-of-setup.outcome == ''success''' | |
- | |
name: 'PHPSpec - Run' | |
run: 'if [ -f phpspec.yml.dist ]; then vendor/bin/phpspec run ; else echo PHPSpec config file does not exist, skipping step ; fi' | |
if: 'always() && steps.end-of-setup.outcome == ''success''' | |
- | |
name: 'Checks security issues - Run' | |
run: 'symfony security:check' | |
if: 'always() && steps.end-of-setup.outcome == ''success''' | |
sonarcloud: | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
# Disabling shallow clone is recommended for improving relevancy of reporting | |
fetch-depth: 0 | |
- name: SonarCloud Scan | |
uses: sonarsource/sonarcloud-github-action@master | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
with: | |
projectBaseDir: . | |
args: > | |
-Dsonar.organization=${{ secrets.SONAR_ORGA }} | |
-Dsonar.projectKey=github-payplug-payplug-syliuspayplugplugin | |
-Dsonar.sources=src/ | |
-Dsonar.test.exclusions=tests/** | |
-Dsonar.tests=tests/ | |
-Dsonar.verbose=true |