Skip to content

Fix: Attempt to cache dependencies installed with composer #226

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

Closed
wants to merge 2 commits into from

Conversation

localheinz
Copy link
Contributor

This PR

  • attempts to cache dependencies installed with composer between builds (faster builds)
  • authenticates with the GitHub API (requires work by you, @bighappyface)

Follows #222 (comment).

💁 This should cut down the build time significantly; after all, more than 95% of the build time are spent on cloning the dependencies.

@@ -1,6 +1,10 @@
sudo: false
language: php

env:
global:
- secure: "foo"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bighappyface

You actually need to create a GitHub token and ideally encrypt it, then replace the result here (use the actual token, not foo, of course).

For this you need to install https://github.com/travis-ci/travis.rb if you haven't already.

Then run

$ travis encrypt GITHUB_TOKEN=foo

from within your local clone of justinrainbow/json-schema, generating output similar to this:

Please add the following to your .travis.yml file:

  secure: "..."

Pro Tip: You can add it automatically by running with --add.

💁 Do not use --add, it just messes up .travis.yml by rewriting it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bighappyface

Alternatively, you can - of course - specify a GITHUB_TOKEN in Travis!

@bighappyface
Copy link
Collaborator

@localheinz I am on the fence about this one.

First, I am a collaborator but not the owner of the repo, so I can't configure repo settings. Push/pull only.

Second, I am wondering if we could achieve essentially the same (or better) performance improvement by bringing composer.lock back into the repo. I know on many other projects that I work with having composer.lock makes the biggest difference that I can feel.

@localheinz
Copy link
Contributor Author

@bighappyface

Both make a lot of sense!

@bighappyface
Copy link
Collaborator

Closing for now

@localheinz localheinz deleted the fix/travis branch April 14, 2016 21:51
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.

2 participants