Skip to content

Migrate tests from travis to GitHub action #10

Migrate tests from travis to GitHub action

Migrate tests from travis to GitHub action #10

Workflow file for this run

name: PHPUnit
on:
pull_request:
push:
permissions:
contents: read
jobs:
build:
name: PHPUnit
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:
- uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
- name: start redis serivces
shell: bash
run: |
docker run -d --name redis -e ALLOW_EMPTY_PASSWORD=yes -p 6379:6379 bitnami/redis:latest
- name: Composer install
run: composer install
- name: use newer phpunit if needed
if: ${{ matrix.php-version >= 8.0 }}
run: |
composer remove --dev phpunit/phpunit
composer require --dev phpunit/phpunit ~9.3 --ignore-platform-reqs
- name: PHPUnit / PHP ${{ matrix.php-version }}
run: ./vendor/bin/phpunit