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

Enhancement: Run tests against lowest, locked, and highest dependencies #18

Merged
merged 1 commit into from
Jul 11, 2018

Conversation

localheinz
Copy link
Contributor

@localheinz localheinz commented Jul 10, 2018

This PR

  • configures Travis CI stages (stan and test) and runs tests against lowest, locked, and highest versions of dependencies

Follows #9 (comment).

πŸ’β€β™‚οΈ For reference, see https://docs.travis-ci.com/user/build-stages/.

- composer validate
stages:
- stan
- test
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This makes the order in which we want to run the stages explicit.

- composer update --prefer-dist --prefer-stable --no-interaction
jobs:
include:
- stage: Stan
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't want to bother running the tests if running phpstan already fails.

script:
- vendor/bin/phpstan analyse -l max -c phpstan.neon src tests

- &TEST
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This creates an anchor, which we can later reference and extend from.

Also see https://blog.daemonl.com/2016/02/yaml.html.

script:
- vendor/bin/phpunit

- <<: *TEST
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here (and below) we extend from the previously declared anchor.


- <<: *TEST

php: 7.0
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We override the PHP version.

jobs:
include:
- stage: Test
php: 7.0
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is what I mean in #17, the indentation is just off.

Copy link
Owner

Choose a reason for hiding this comment

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

Thanks, this makes it more obvious.

@Jan0707 Jan0707 merged commit 2547abc into Jan0707:master Jul 11, 2018
@localheinz localheinz deleted the feature/dependencies branch July 11, 2018 07:46
@localheinz
Copy link
Contributor Author

Thank you, @Jan0707!

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