Skip to content

run-tests

run-tests #669

Workflow file for this run

name: run-tests
on:
push:
pull_request:
schedule:
- cron: '0 0 * * *'
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
php: [8.0, 8.1]
statamic: [3.3.*, 4.*]
os: [ubuntu-latest]
include:
- statamic: 3.3.*
testbench: ^6.23
- statamic: 3.3.*
testbench: ^7.0
- statamic: 4.*
testbench: ^7.0
- php: 8.0
additional-deps: "mockery/mockery:^1.3.3"
phpunit: 9.*
- php: 8.1
additional-deps: "mockery/mockery:^1.3.3"
name: P${{ matrix.php }} - S${{ matrix.statamic }} - ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache/files
key: dependencies-statamic-${{ matrix.statamic }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, soap, intl, gd, exif, iconv, imagick
coverage: none
- name: Install dependencies
run: |
composer require "orchestra/testbench:${{ matrix.testbench }}" "statamic/cms:${{ matrix.statamic }}" ${{ matrix.additional-deps }} --no-interaction --no-update
composer update --prefer-stable --prefer-dist --no-interaction
- name: Execute tests
run: vendor/bin/phpunit