Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI Overhaul #10

Merged
merged 4 commits into from Nov 20, 2017
Merged

CI Overhaul #10

merged 4 commits into from Nov 20, 2017

Conversation

aejnsn
Copy link
Contributor

@aejnsn aejnsn commented Nov 20, 2017

The build wasn't testing anything, thus the code coverage fell to 0%. We were running against Circle's PHPUnit 6, which has namespace changes from 4.x/5.x. I am guessing it broke down when Circle upgraded their image with PHPUnit 6.

screen shot 2017-11-20 at 12 44 13 am

This PR spans a bit far for my liking, but here I am submitting it. I've broken this into four commits with an explanation for each:

Upgrade to PHPUnit 6. - 662a8db
I added PHPUnit 6.x as a dev dependency and fixed breaking changes.

Fix Illuminate requirements. - 4cf906d
I don't know how this was ever running inside Laravel 5.1. With 5.1, this was happening:

Aarons-MacBook-Pro:temporal-models aaron$ composer update --prefer-lowest --prefer-dist --prefer-stable --no-suggest
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 6 updates, 0 removals
  - Updating nesbot/carbon (1.20.0 => 1.19.0): Loading from cache
  - Installing danielstjules/stringy (1.8.0): Loading from cache
  - Updating illuminate/contracts (v5.2.0 => v5.1.1): Loading from cache
  - Updating illuminate/support (v5.2.0 => v5.1.1): Loading from cache
  - Updating illuminate/container (v5.2.0 => v5.1.1): Loading from cache
  - Updating illuminate/database (v5.2.0 => v5.1.41): Downloading (100%)         
  - Updating illuminate/events (v5.2.0 => v5.1.41): Downloading (100%)         
Package dflydev/markdown is abandoned, you should avoid using it. Use michelf/php-markdown instead.
Package guzzle/guzzle is abandoned, you should avoid using it. Use guzzlehttp/guzzle instead.
Writing lock file
Generating autoload files
Aarons-MacBook-Pro:temporal-models aaron$ vendor/bin/phpunit --filter=testItReceivesInvalidResultsFromInvalidScope
PHPUnit 6.0.0 by Sebastian Bergmann and contributors.

Runtime:       PHP 7.1.4 with Xdebug 2.5.3
Configuration: /Users/aaron/Desktop/Development/temporal-models/phpunit.xml.dist

E                                                                   1 / 1 (100%)

Time: 146 ms, Memory: 8.00Mb

There was 1 error:

1) TemporalTest::testItReceivesInvalidResultsFromInvalidScope
Error: Call to a member function toArray() on string

/Users/aaron/Desktop/Development/temporal-models/tests/TemporalTest.php:391

ERRORS!
Tests: 1, Assertions: 0, Errors: 1.

Update dev dependencies. - a72c9ac
Mockery went 1.0, finally, and I think the php-coveralls/php-coveralls package is the official package (same underlying repo). However, swapping the Coveralls package doesn't fix the Package guzzle/guzzle is abandoned, you should avoid using it. Use guzzlehttp/guzzle instead. Check out php-coveralls/php-coveralls#203. If you can understand what its maintainer is trying to do, you're doing better than me.

Upgrade to CircleCI 2.0. - 098cdeb
I've removed circle.yml, adding .circleci/config.yml for 2.0. 4 jobs are configured--a lowest and latest set of dependencies on both PHP 7.0 and 7.1. I'd configure PHP 7.2 if Circle had an image--didn't want to get into using a non-Circle image. Circle's Docker images are wayyy heavy though, something like 1.5GB (I'm sure they cache) and their config format needs some polish. Coveralls should handle the coverage for parallel builds--seems to be working in my fork.

Check out the builds here:
https://circleci.com/gh/aejnsn/temporal-models/tree/ci-upgrade-fixes
https://coveralls.io/github/aejnsn/temporal-models

@joshforbes
Copy link
Contributor

Thanks for this! 🙌

@joshforbes joshforbes merged commit 80e5eb4 into kimmelsg:master Nov 20, 2017
@aejnsn aejnsn deleted the ci-upgrade-fixes branch November 22, 2017 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants