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: |