PPSYL-163 - Unified Authentication #284
This file contains hidden or 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.4.*' | |
| 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@v4 | |
| 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 ruleset/phpstan.neon ]; then vendor/bin/phpstan analyse -c ruleset/phpstan.neon src/ ; else echo PHPStan rulesets file does not exist, skipping step ; fi' | |
| if: 'always() && steps.end-of-setup.outcome == ''success''' | |
| # TODO: launch Grumphp | |
| sonarcloud: | |
| if: github.event.repository.fork != true | |
| 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 |