Skip to content
Closed
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
39 changes: 26 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ 8.1, 8.2, 8.3 ]
php: [ 8.1, 8.2, 8.3, 8.4 ]

steps:
- uses: actions/checkout@v4

- name: Cache Composer dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
Expand All @@ -37,7 +37,7 @@ jobs:
needs: [ composer ]
strategy:
matrix:
php: [ 8.1, 8.2, 8.3 ]
php: [ 8.1, 8.2, 8.3, 8.4 ]

outputs:
coverage: ${{ steps.store-coverage.outputs.coverage_text }}
Expand All @@ -52,11 +52,10 @@ jobs:
run: tar -xvf /tmp/github-actions/build.tar ./

- name: PHP Unit tests
uses: php-actions/phpunit@master
uses: php-actions/phpunit@v4
env:
XDEBUG_MODE: cover
with:
version: 10
php_version: ${{ matrix.php }}
php_extensions: xdebug
coverage_text: _coverage/coverage.txt
Expand All @@ -73,9 +72,11 @@ jobs:
needs: [ phpunit ]
strategy:
matrix:
php: [ 8.1, 8.2, 8.3 ]
php: [ 8.1, 8.2, 8.3, 8.4 ]

steps:
- uses: actions/checkout@v4

- uses: actions/download-artifact@v4
with:
name: code-coverage-${{ matrix.php }}-${{ github.run_number }}
Expand All @@ -85,16 +86,14 @@ jobs:
run: cat "_coverage/coverage.txt"

- name: Upload to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
uses: codecov/codecov-action@v5

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

steps:
- uses: actions/download-artifact@v4
Expand All @@ -110,14 +109,13 @@ jobs:
with:
php_version: ${{ matrix.php }}
path: src/
level: 6

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

steps:
- uses: actions/download-artifact@v4
Expand All @@ -141,7 +139,7 @@ jobs:
needs: [ composer ]
strategy:
matrix:
php: [ 8.1, 8.2, 8.3 ]
php: [ 8.1, 8.2, 8.3, 8.4 ]

steps:
- uses: actions/download-artifact@v4
Expand All @@ -158,3 +156,18 @@ jobs:
php_version: ${{ matrix.php }}
path: src/
standard: phpcs.xml

remove_old_artifacts:
runs-on: ubuntu-latest

steps:
- name: Remove old artifacts for prior workflow runs on this repository
env:
GH_TOKEN: ${{ github.token }}
run: |
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 ... "
gh api --method DELETE /repos/${{ github.repository }}/actions/artifacts/$id && echo "Done"
done <artifact-id-list.txt
Loading