Skip to content

Commit

Permalink
refactor: add workflow to test older php versions
Browse files Browse the repository at this point in the history
  • Loading branch information
lrosenfeldt committed Aug 8, 2024
1 parent 53d9e7f commit 376b19d
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/test_backwards.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Run tests against older PHP versions

on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
workflow_dispatch:
workflow_call:

jobs:
test_backwards:
runs-on: ubuntu-20.04
strategy:
matrix:
php-version: ['8.2']
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: composer

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

- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}

- name: Install dependencies
run: composer install --no-progress --no-interaction --prefer-dist

- name: Run tests
run: composer run-script test

0 comments on commit 376b19d

Please sign in to comment.