🔄 synced file(s) with dealroom/core-mothership #938
Workflow file for this run
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: Test & Release | |
on: [push, pull_request] | |
permissions: | |
pull-requests: write | |
contents: write | |
statuses: write | |
jobs: | |
tests: | |
name: Run Tests (PHP ${{ matrix.php-version }}) | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php-version: ['8.2', '8.3'] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ matrix.php-version }} | |
cancel-in-progress: true | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Setup Environment | |
uses: ./.github/actions/setup | |
with: | |
php-version: ${{ matrix.php-version }} | |
extensions: ${{ vars.EXTENSIONS }} | |
github-token: ${{ secrets.GH_TOKEN_DEALROOMBA }} | |
- name: Test | |
uses: ./.github/actions/test | |
with: | |
cc-reporter-id: ${{ secrets.CC_REPORTER_ID }} | |
cc-coverage-location: ${{ github.workspace }} | |
test-results: | |
if: ${{ always() }} | |
runs-on: ubuntu-latest | |
name: Test Final Results | |
needs: tests | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Aggregate Test Results | |
uses: ./.github/actions/test-results | |
with: | |
needs: ${{ toJson(needs) }} | |
release: | |
runs-on: ubuntu-latest | |
needs: test-results | |
name: Release | |
if: github.ref == 'refs/heads/main' | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: true | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
fetch-depth: '0' | |
- name: Release | |
uses: ./.github/actions/github-release | |
with: | |
github-token: ${{ secrets.GH_TOKEN_DEALROOMBA }} |