mirror of
https://github.com/opdavies/gmail-filter-builder.git
synced 2025-01-22 12:07:32 +00:00
Add run-tests workflow
This commit is contained in:
parent
37c48b07e6
commit
7db076efdb
47
.github/workflows/run-tests.yml
vendored
Normal file
47
.github/workflows/run-tests.yml
vendored
Normal file
|
@ -0,0 +1,47 @@
|
|||
name: Run tests
|
||||
|
||||
on:
|
||||
push:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
php: [7.4, 7.3, 7.2]
|
||||
dependency-version: [prefer-lowest, prefer-stable]
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
|
||||
name: "PHP ${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}"
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Cache dependencies
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.composer/cache/files
|
||||
key: dependencies-composer-${{ hashFiles('composer.json') }}
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
extensions: mbstring
|
||||
coverage: none
|
||||
|
||||
- name: Install Composer dependencies
|
||||
run: |
|
||||
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
|
||||
composer update sebastian/comparator
|
||||
|
||||
- name: Configure matchers
|
||||
uses: mheap/phpunit-matcher-action@master
|
||||
|
||||
- name: Execute tests
|
||||
run: vendor/bin/phpunit --teamcity
|
|
@ -3,7 +3,7 @@
|
|||
namespace Opdavies\GmailFilterBuilder\Service;
|
||||
|
||||
use Opdavies\GmailFilterBuilder\Exception\PartialNotFoundException;
|
||||
use Tightenco\Collect\Support\Collection;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* A service for loading addresses from separate files.
|
||||
|
|
|
@ -5,7 +5,7 @@ namespace Opdavies\Tests\GmailFilterBuilder\Service;
|
|||
use Opdavies\GmailFilterBuilder\Exception\PartialNotFoundException;
|
||||
use Opdavies\GmailFilterBuilder\Service\Addresses;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Tightenco\Collect\Support\Collection;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Test loading addresses from a separate file.
|
||||
|
|
Loading…
Reference in a new issue