Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/test-composer-install.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Test Installation With Different PHP Versions

on: [push]

jobs:
run-composer-install:
name: Run Composer Install
runs-on: ubuntu-latest

strategy:
matrix:
php-version:
- "7.1"
- "7.2"
- "7.3"
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
- "8.4"

steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
extensions: json, xdebug
tools: composer:v2

- name: Check Out Code
uses: actions/checkout@v2

- name: Get Composer Cache Directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Connect Downloaded Dependencies With A Cache In GitHub
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
# Note: Normally, we'd use the composer.lock to generate a hash,
# but the lock file is currently not versioned.
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install Production Dependencies
run: composer install --no-dev --prefer-dist