Ignore md and docs from workflows #37
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: Code Quality | |
| on: | |
| workflow_call: | |
| workflow_dispatch: | |
| pull_request: | |
| branches: | |
| - master | |
| - develop | |
| paths-ignore: | |
| - '**.md' | |
| - 'docs/**' | |
| push: | |
| branches: | |
| - master | |
| - develop | |
| paths-ignore: | |
| - '**.md' | |
| - 'docs/**' | |
| jobs: | |
| code-quality: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Force linux line endings | |
| run: | | |
| git config --global core.autocrlf false | |
| git config --global core.eol lf | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: 8.4 | |
| extensions: mbstring, json, grpc, opentelemetry | |
| ini-values: post_max_size=512M, max_execution_time=180 | |
| coverage: xdebug | |
| tools: phpcs, phpstan, phpunit | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup problem matchers for PHPUnit | |
| run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
| - name: Get composer cache directory | |
| id: composer-cache | |
| run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
| - name: Cache dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: ${{ runner.os }}-composer-${{ matrix.php-versions }} | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --dev | |
| - name: Build Vite manifest | |
| run: | | |
| npm install | |
| npm run build | |
| - name: Run PHP Codesniffer | |
| run: phpcs | |
| - name: Run tests and collect coverage | |
| run: vendor/bin/phpunit --coverage-clover coverage.xml | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| build-and-push-docker: | |
| needs: code-quality | |
| uses: ./.github/workflows/build-and-push-docker.yml | |
| secrets: inherit | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| # Only build docker images on pushes to master, develop and tags | |
| if: | |
| ( | |
| startsWith(github.ref, 'refs/tags') || | |
| github.ref == format('refs/heads/{0}', 'master') || | |
| github.ref == format('refs/heads/{0}', 'develop') | |
| ) && | |
| github.event_name != 'pull_request' | |