From 2eefe19a9636b0bf6ddb0d94f05331e68ff90690 Mon Sep 17 00:00:00 2001 From: Rotzbua Date: Mon, 28 Oct 2024 20:58:44 +0100 Subject: [PATCH] chore(ci): update GH Actions php test - php versions should be strings - caching updated to current recommendation - fixed env var name --- .github/workflows/tests.yaml | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 57101de92f..7b705eb2f7 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -10,20 +10,18 @@ permissions: contents: read # to fetch code (actions/checkout) jobs: - unit-tests: - - runs-on: ${{ matrix.os }} - strategy: matrix: - php: [8.3, 8.2, 8.1, 8.0, 7.4, 7.3] + php: ['8.3', '8.2', '8.1', '8.0', '7.4', '7.3'] os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - name: Setup PHP + - name: Setup PHP ${{ matrix.php }} uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} @@ -31,20 +29,14 @@ jobs: tools: composer:v2 coverage: none env: - COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} - -# - name: Update composer -# run: composer update -# -# - name: Validate composer.json and composer.lock -# run: composer validate + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - 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@v4 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}