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

Travis build stages #56

Merged
merged 3 commits into from
Nov 24, 2017
Merged

Conversation

laughedelic
Copy link
Member

@laughedelic laughedelic commented Nov 24, 2017

Here I replace CI script and deploy block with Build Stages (a beta feature of Travis). It allows you to run release stage only if all jobs from the test stage have passed (without stages deploy block is executed in every job, so you need to workaround it with complicated conditions).

I also show here how different test-suites can be run in parallel. It's probably not that useful now, so I can remove it, but it could be useful when we have more time-consuming tests.

Also note that TEST env var is used just to distinguish jobs:

screen shot 2017-11-24 at 05 18 54

I hope this also fixes the problem with releasing on merge (and not on normal push). We'll see when we merge this PR 🤞

Copy link
Member

@olafurpg olafurpg left a comment

Choose a reason for hiding this comment

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

LGTM 👍 besides the test matrix, we should try to keep the matrix as small as possible

.travis.yml Outdated
script: ./bin/scalafmt --test
- env: TEST="languageserver/test"
script: sbt $TEST
- env: TEST="tests.ctags"
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need to split the tests into different matrices yet. In #51 I added tests tests.compiler, which would not be caught by this. Full test suite still runs in <2-3 minutes.

Copy link
Member

Choose a reason for hiding this comment

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

I suspect we'll want this later down the road however once we get heavier integration tests 👍

Copy link
Member Author

Choose a reason for hiding this comment

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

OK. Addressed in cb64f24

Copy link
Member

@olafurpg olafurpg left a comment

Choose a reason for hiding this comment

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

LGTM!

@olafurpg olafurpg merged commit fda00d4 into scalameta:master Nov 24, 2017
@laughedelic laughedelic deleted the travis-build-stages branch November 24, 2017 21:04
@laughedelic
Copy link
Member Author

scalameta has just released version fda00d4 of the package metaserver!
Grab it from Bintray now:
https://bintray.com/scalameta/maven/metaserver/fda00d4c

Cheers,
Bintray

And I just checked that it doesn't release on normal push to master: https://travis-ci.org/scalameta/language-server/builds/306921020 🎉 Finally it works!

@olafurpg
Copy link
Member

Sweet! Build stages looks very promising, we have had a lot of problems with this in the scalameta build where we publish over 70 artifacts!

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