From d7275381e60de174cbb474156ea8a449d136f7a0 Mon Sep 17 00:00:00 2001 From: DevDavido <997605+DevDavido@users.noreply.github.com> Date: Fri, 22 Dec 2023 14:18:11 +0100 Subject: [PATCH] build: Update tests workflow --- .github/workflows/tests.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index dac5e3c..c907293 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -5,6 +5,10 @@ on: [push, pull_request] jobs: test: runs-on: ${{ matrix.os }} + permissions: + checks: write + pull-requests: write + contents: read strategy: fail-fast: false matrix: @@ -16,7 +20,11 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 + with: + fetch-depth: 2 + lfs: true + persist-credentials: false - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -26,19 +34,17 @@ jobs: - name: Get composer cache directory 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@v3 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: | - ${{ runner.os }}-composer- - ${{ runner.os }}- + restore-keys: ${{ runner.os }}-composer-${{ matrix.dependency-version }}- - name: Install dependencies - run: composer update --${{ matrix.dependency-version }} --prefer-source --no-interaction + run: composer update --${{ matrix.dependency-version }} --no-interaction - name: Setup problem matches run: |