loki-sinclair-hdruk triggered quality check pipeline #6767
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: Run quality checks | |
| run-name: ${{ github.actor }} triggered quality check pipeline | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| - dev | |
| - release | |
| env: | |
| SLACK_WEBHOOK_URL: '${{ secrets.SLACK_WEBHOOK_URL}}' | |
| SLACK_CHANNEL: '${{ secrets.GITHUBACTIONS_SLACK_CHANNEL }}' | |
| jobs: | |
| test: | |
| timeout-minutes: 30 | |
| runs-on: ubuntu-latest | |
| environment: |- | |
| ${{ | |
| github.ref_name == 'dev' && 'dev' | |
| || github.base_ref == 'dev' && 'dev' | |
| || 'release' | |
| }} | |
| steps: | |
| - name: Checkout | |
| id: checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP with PECL extension | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.3' | |
| - name: Configure Composer GitHub auth | |
| id: composerauth | |
| run: composer config --global github-oauth.github.com "${{ secrets.COMPOSER_GITHUB_TOKEN }}" | |
| - name: Cache Composer dependencies | |
| id: composercache | |
| uses: actions/cache@v4 | |
| with: | |
| path: vendor | |
| # composer.lock isn't committed, so key on composer.json instead | |
| key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-composer- | |
| - name: Composer install | |
| id: composerinstall | |
| run: "composer install" | |
| - name: Run static analysis | |
| id: composerphpstan | |
| run: "composer run phpstan" | |
| - name: Run unit tests | |
| id: unittests | |
| run: "composer run pest" | |
| # - name: Run one unit test file | |
| # id: unittests | |
| # run: "composer run pest -- --filter test_data_provider_colls_search_with_success" | |
| - name: Run code sniffer | |
| id: codesniffer | |
| run: "composer run phpcs" | |
| - name: Run Notification | |
| id: runnotificationsent | |
| uses: act10ns/slack@v1 | |
| with: | |
| status: ${{ job.status }} | |
| steps: ${{ toJson(steps) }} | |
| channel: ${{ env.SLACK_CHANNEL }} | |
| message: Running CI tests on {{ env.GITHUB_REF_NAME }} branch ${{ job.status }} | |
| if: always() |