Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
danharrin committed Oct 7, 2020
1 parent 9c2f0f6 commit aef5ac2
Show file tree
Hide file tree
Showing 8 changed files with 1,462 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: run-tests

on:
push:
pull_request:
schedule:
- cron: '0 0 * * *'

jobs:
run-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [7.4, 7.3, 7.2, 7.1]
laravel: [8.*, 7.*, 6.*, 5.8.*]
dependency-version: [prefer-lowest, prefer-stable]
include:
- laravel: 8.*
testbench: 6.*
- laravel: 7.*
testbench: 5.*
- laravel: 6.*
testbench: 4.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.composer/cache/files
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring, pdo, pdo_sqlite
coverage: none

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
- name: Execute tests
run: vendor/bin/phpunit
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/vendor
.phpunit.result.cache
composer.lock
39 changes: 39 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "danharrin/squire",
"description": "A collection of static Eloquent models for common fixture data.",
"keywords": [
"squire",
"squire",
"eloquent",
"laravel"
],
"homepage": "https://github.com/danharrin/squire",
"type": "library",
"license": "MIT",
"authors": [
{
"name": "Dan Harrin",
"email": "[email protected]"
}
],
"require": {
"php": "^7.1.3",
"calebporzio/sushi": "^2.1",
"illuminate/database": "^5.8 || ^6.0 || ^7.0 || ^8.0",
"illuminate/support": "^5.8 || ^6.0 || ^7.0 || ^8.0"
},
"require-dev": {
"orchestra/testbench": "^6.2",
"phpunit/phpunit": "^9.4"
},
"autoload": {
"psr-4": {
"Squire\\": "src"
}
},
"config": {
"sort-packages": true
},
"minimum-stability": "dev",
"prefer-stable": true
}
13 changes: 13 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" bootstrap="vendor/autoload.php" executionOrder="depends,defects" colors="true" beStrictAboutOutputDuringTests="true" beStrictAboutTodoAnnotatedTests="true" verbose="true">
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">src</directory>
</include>
</coverage>
<testsuites>
<testsuite name="default">
<directory suffix="Test.php">tests</directory>
</testsuite>
</testsuites>
</phpunit>
Loading

0 comments on commit aef5ac2

Please sign in to comment.