Skip to content

docs: fix ci badge (travis => gh actions) #16

docs: fix ci badge (travis => gh actions)

docs: fix ci badge (travis => gh actions) #16

Workflow file for this run

name: Unit Tests
on:
push:
branches:
- master
pull_request: ~
jobs:
unit-test:
name: Unit ( PHP ${{ matrix.php }} )
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- php: 7.2
- php: 7.3
- php: 7.4
- php: 8.0
- php: 8.1
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: intl, opcache, mysql, pdo_mysql, :xdebug
- name: Get composer cache directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json composer.lock') }}
restore-keys: ${{ runner.os }}-php-${{ matrix.php }}-composer-
- name: Install dependencies
run: composer update $COMPOSER_FLAGS
- name: Run unit tests
run: bin/phpunit
lowest:
name: Unit ( PHP ${{ matrix.php }} + Lowest )
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- php: 7.2
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: intl, opcache, mysql, pdo_mysql, :xdebug
- name: Get composer cache directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json composer.lock') }}
restore-keys: ${{ runner.os }}-php-${{ matrix.php }}-composer-
- name: Install dependencies
run: composer update --prefer-lowest --prefer-stable
- name: Run unit tests
run: bin/phpunit