Align the tooling with the ecosystem standard. #115
Workflow file for this run
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: CI | |
| on: | |
| pull_request: | |
| concurrency: | |
| group: ci-${{ github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| resolve-tooling-image: | |
| name: Resolve tooling image | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| outputs: | |
| php-image: ${{ steps.config.outputs.php-image }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Resolve tooling image from the Makefile | |
| id: config | |
| run: echo "php-image=$(make show-image)" >> "$GITHUB_OUTPUT" | |
| build: | |
| name: Build | |
| needs: resolve-tooling-image | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| env: | |
| image: ${{ needs.resolve-tooling-image.outputs.php-image }} | |
| workspace: /var/www/html | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Validate composer.json | |
| run: docker run --rm -v "${PWD}":${{ env.workspace }} ${{ env.image }} composer validate --no-interaction | |
| - name: Install dependencies | |
| run: > | |
| docker run --rm -v "${PWD}":${{ env.workspace }} ${{ env.image }} | |
| composer install --no-progress --optimize-autoloader --prefer-dist --no-interaction | |
| - name: Upload vendor and composer.lock as artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: vendor-artifact | |
| path: | | |
| vendor | |
| composer.lock | |
| auto-review: | |
| name: Auto review | |
| needs: [resolve-tooling-image, build] | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Download vendor artifact from build | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: vendor-artifact | |
| path: . | |
| - name: Run review | |
| run: make review | |
| tests: | |
| name: Tests | |
| needs: [resolve-tooling-image, auto-review] | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Download vendor artifact from build | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: vendor-artifact | |
| path: . | |
| - name: Run tests | |
| run: make tests tests-without-bcmath |