Skip to content

Commit

Permalink
chore(ci): update GH Actions php test
Browse files Browse the repository at this point in the history
- php versions should be strings
- caching updated to current recommendation
- fixed env var name
  • Loading branch information
Rotzbua committed Oct 28, 2024
1 parent 5cf7ef8 commit 2eefe19
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,41 +10,33 @@ 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 }}
extensions: opcache, gd
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') }}
Expand Down

0 comments on commit 2eefe19

Please sign in to comment.