Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: actions/cache@v4
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
key: ${{ runner.os }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}

- name: Composer install
uses: php-actions/composer@v6
Expand All @@ -29,7 +29,7 @@ jobs:
- name: Upload build archive for test runners
uses: actions/upload-artifact@v4
with:
name: build-artifact
name: build-artifact-${{ matrix.php }}
path: /tmp/github-actions

phpunit:
Expand All @@ -45,7 +45,7 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with:
name: build-artifact
name: build-artifact-${{ matrix.php }}
path: /tmp/github-actions

- name: Extract build archive
Expand All @@ -62,21 +62,24 @@ jobs:
coverage_clover: _coverage/clover.xml

- name: Store coverage data
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: code-coverage
name: code-coverage-${{ matrix.php }}-${{ github.run_number }}
path: _coverage

coverage:
runs-on: ubuntu-latest
needs: [ phpunit ]
strategy:
matrix:
php: [ 8.1, 8.2, 8.3, 8.4 ]

steps:
- uses: actions/checkout@v4

- uses: actions/download-artifact@v4
with:
name: code-coverage
name: code-coverage-${{ matrix.php }}-${{ github.run_number }}
path: _coverage

- name: Output coverage
Expand All @@ -95,7 +98,7 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with:
name: build-artifact
name: build-artifact-${{ matrix.php }}
path: /tmp/github-actions

- name: Extract build archive
Expand All @@ -117,7 +120,7 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with:
name: build-artifact
name: build-artifact-${{ matrix.php }}
path: /tmp/github-actions

- name: Extract build archive
Expand All @@ -141,7 +144,7 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with:
name: build-artifact
name: build-artifact-${{ matrix.php }}
path: /tmp/github-actions

- name: Extract build archive
Expand All @@ -162,7 +165,7 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
run: |
gh api "/repos/${{ github.repository }}/actions/artifacts?name=build-artifact" | jq ".artifacts[] | select(.name == \"build-artifact\") | .id" > artifact-id-list.txt
gh api "/repos/${{ github.repository }}/actions/artifacts?name=build-artifact" | jq ".artifacts[] | select(.name | startswith(\"build-artifact\")) | .id" > artifact-id-list.txt
while read id
do
echo -n "Deleting artifact ID $id ... "
Expand Down
Loading