Skip to content

Commit

Permalink
Merge pull request #10 from aejnsn/ci-upgrade-fixes
Browse files Browse the repository at this point in the history
CI Overhaul
  • Loading branch information
joshforbes committed Nov 20, 2017
2 parents 47fb060 + 098cdeb commit 80e5eb4
Show file tree
Hide file tree
Showing 5 changed files with 131 additions and 20 deletions.
122 changes: 122 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
version: 2
jobs:
test-7.0-latest:
docker:
- image: circleci/php:7.0.25-node-browsers
steps:
- checkout
- run:
name: Update Composer
command: 'composer self-update'
- run:
name: Validate composer.json
command: 'composer validate --strict'
- restore_cache:
key: dependency-cache-7.0-latest-{{ checksum "composer.json" }}
- run:
name: Install dependencies
command: composer update --prefer-dist --prefer-stable --no-suggest
- save_cache:
key: dependency-cache-7.0-latest-{{ checksum "composer.json" }}
paths:
- vendor
- run:
name: Run test suite
command: vendor/bin/phpunit
- store_test_results:
path: build/logs/clover.xml
- run:
name: Send coverage to Coveralls
command: vendor/bin/coveralls -n
test-7.1-latest:
docker:
- image: circleci/php:7.1.11-node-browsers
steps:
- checkout
- run:
name: Update Composer
command: 'composer self-update'
- run:
name: Validate composer.json
command: 'composer validate --strict'
- restore_cache:
key: dependency-cache-7.1-latest-{{ checksum "composer.json" }}
- run:
name: Install dependencies
command: composer update --prefer-dist --prefer-stable --no-suggest
- save_cache:
key: dependency-cache-7.1-latest-{{ checksum "composer.json" }}
paths:
- vendor
- run:
name: Run test suite
command: vendor/bin/phpunit
- store_test_results:
path: build/logs/clover.xml
- run:
name: Send coverage to Coveralls
command: vendor/bin/coveralls -n
test-7.0-lowest:
docker:
- image: circleci/php:7.0.25-node-browsers
steps:
- checkout
- run:
name: Update Composer
command: 'composer self-update'
- run:
name: Validate composer.json
command: 'composer validate --strict'
- restore_cache:
key: dependency-cache-7.0-lowest-{{ checksum "composer.json" }}
- run:
name: Install dependencies
command: composer update --prefer-dist --prefer-lowest --prefer-stable --no-suggest
- save_cache:
key: dependency-cache-7.0-lowest-{{ checksum "composer.json" }}
paths:
- vendor
- run:
name: Run test suite
command: vendor/bin/phpunit
- store_test_results:
path: build/logs/clover.xml
- run:
name: Send coverage to Coveralls
command: vendor/bin/coveralls -n
test-7.1-lowest:
docker:
- image: circleci/php:7.1.11-node-browsers
steps:
- checkout
- run:
name: Update Composer
command: 'composer self-update'
- run:
name: Validate composer.json
command: 'composer validate --strict'
- restore_cache:
key: dependency-cache-7.1-lowest-{{ checksum "composer.json" }}
- run:
name: Install dependencies
command: composer update --prefer-dist --prefer-lowest --prefer-stable --no-suggest
- save_cache:
key: dependency-cache-7.1-lowest-{{ checksum "composer.json" }}
paths:
- vendor
- run:
name: Run test suite
command: vendor/bin/phpunit
- store_test_results:
path: build/logs/clover.xml
- run:
name: Send coverage to Coveralls
command: vendor/bin/coveralls -n
workflows:
version: 2
test:
jobs:
- test-7.0-latest
- test-7.0-lowest
- test-7.1-latest
- test-7.1-lowest
11 changes: 0 additions & 11 deletions circle.yml

This file was deleted.

10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
"license": "MIT",
"require": {
"php" : ">=7.0.0",
"illuminate/database": "^5.1",
"illuminate/events": "^5.1"
"illuminate/database": "^5.2",
"illuminate/events": "^5.2"
},
"require-dev": {
"phpunit/phpunit" : "^4.0",
"mockery/mockery": "^0.9.4",
"satooshi/php-coveralls": "1.*"
"phpunit/phpunit": "~6.0",
"mockery/mockery": "~1.0",
"php-coveralls/php-coveralls": "~1.0"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 2 additions & 2 deletions tests/TemporalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function testItCanCheckIfATemporalModelIsValid()
*/
public function testItCannotSaveWithAStartDateInThePast()
{
$this->setExpectedException(InvalidDateRangeException::class);
$this->expectException(InvalidDateRangeException::class);

$stub = new TemporalTestCommission();
$stub->agent_id = 1;
Expand All @@ -117,7 +117,7 @@ public function testItCannotSaveWithAStartDateInThePast()
*/
public function testItCannotSaveWithAStartDateAfterTheEndDate()
{
$this->setExpectedException(InvalidDateRangeException::class);
$this->expectException(InvalidDateRangeException::class);

$stub = new TemporalTestCommission();
$stub->agent_id = 1;
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace NavJobs\Temporal\Test;

use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase as BaseTestCase;

abstract class TestCase extends PHPUnit_Framework_TestCase
abstract class TestCase extends BaseTestCase
{
public function setUp()
{
Expand Down

0 comments on commit 80e5eb4

Please sign in to comment.