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
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -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!


matrix:
fast_finish: true
include:
Expand All @@ -13,11 +17,16 @@ matrix:
allow_failures:
- php: 7

cache:
directories:
- $HOME/.composer/cache

before_install:
- composer selfupdate
- composer config github-oauth.github.com $GITHUB_TOKEN

install:
- travis_retry composer install --no-interaction --prefer-source
- travis_retry composer install --no-interaction --prefer-dist

script:
- vendor/bin/phpunit --coverage-text