From 5255f96e4d9cbf3334b292b7c283be56ee09ef9d Mon Sep 17 00:00:00 2001 From: "Emma C. Hughes" <84008144+emmachughes@users.noreply.github.com> Date: Thu, 13 Feb 2025 10:07:23 +0100 Subject: [PATCH 1/2] update actions --- .github/workflows/phpunit.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index f50a2a5..affe9a8 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -5,7 +5,7 @@ on: [push, pull_request] jobs: test: name: Test (PHP ${{ matrix.php-versions }}) - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 strategy: fail-fast: false @@ -14,21 +14,20 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-versions }} coverage: pcov - extensions: sockets - name: Get Composer cache dir id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Cache dependencies - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-php-${{ matrix.php-versions }}-composer-${{ hashFiles('**/composer.json') }} @@ -41,5 +40,4 @@ jobs: run: vendor/bin/phpunit --coverage-clover=coverage.xml - name: Upload code coverage - uses: codecov/codecov-action@v3 - + uses: codecov/codecov-action@v4 From c2f7a2b73e823a2e8d3ba6e2787fcf8cc22d13bc Mon Sep 17 00:00:00 2001 From: "Emma C. Hughes" <84008144+emmachughes@users.noreply.github.com> Date: Thu, 13 Feb 2025 10:10:13 +0100 Subject: [PATCH 2/2] use better CI triggers --- .github/workflows/phpunit.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index affe9a8..7ba7cbc 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -1,6 +1,15 @@ name: Run PHPUnit -on: [push, pull_request] +on: + push: + branches: + - master + tags: + - 'v*' + pull_request: + branches: + - master + workflow_dispatch: jobs: test: