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

Install bloop server in CI #982

Merged
merged 2 commits into from
Oct 17, 2019
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ jobs:
steps:
- uses: actions/checkout@v1
- uses: olafurpg/setup-scala@v4
- run: sbt unit/test
- run: bin/test.sh unit/test
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,4 @@ website/node_modules
website/i18n/*
!website/i18n/en.json

project/metals.sbt
.bloop/*
.metals/*
project/metals.sbt
Copy link
Member

Choose a reason for hiding this comment

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

Should this change be included?

Copy link
Contributor

Choose a reason for hiding this comment

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

That's fine, we want to have it gitignored

23 changes: 9 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,25 @@ jobs:
include:
# default stage is test
- env: TEST="scalafmt+scalafix+docs"
before_script: nvm install 'lts/*' && nvm use 'lts/*'
before_script:
- nvm install 'lts/*' && nvm use 'lts/*'
script:
- ./bin/scalafmt --test
- sbt scalafixCheck docs/docusaurusCreateSite
- env: TEST="sbt 'slow/testOnly -- tests.sbt'"
script:
- sbt 'slow/testOnly -- tests.sbt'
script: bin/test.sh 'slow/testOnly -- tests.sbt'
- env: TEST="sbt 'slow/testOnly -- tests.mill'"
script:
- sbt 'slow/testOnly -- tests.mill'
script: bin/test.sh 'slow/testOnly -- tests.mill'
- env: TEST="sbt 'slow/testOnly -- tests.gradle'"
script:
- sbt 'slow/testOnly -- tests.gradle'
script: bin/test.sh 'slow/testOnly -- tests.gradle'
- env: TEST="sbt 'slow/testOnly -- tests.maven'"
script:
- sbt 'slow/testOnly -- tests.maven'
script: bin/test.sh 'slow/testOnly -- tests.maven'
- env: TEST="sbt 'slow/testOnly -- tests.feature'"
script:
- sbt 'slow/testOnly -- tests.feature'
script: bin/test.sh 'slow/testOnly -- tests.feature'
- env: TEST="sbt +cross/test"
script:
- sbt +cross/test
- stage: release
before_script: nvm install 'lts/*' && nvm use 'lts/*'
script: sbt +cross/test
- stage: release
script:
- git fetch --tags
- sbt ci-release docs/docusaurusPublishGhpages
Expand Down
2 changes: 1 addition & 1 deletion bin/azure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ source ~/.jabba/jabba.sh
jabba install adopt@1.8.0-222
jabba use adopt@1.8.0-222
java -version
./sbt unit/test
bin/test.sh unit/test
19 changes: 19 additions & 0 deletions bin/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

bloopDir="bloop-server"

function bloop_version {
grep "val bloop" build.sbt | sed 's|[^0-9.]||g'
}

[ -d "$bloopDir" ] && rm -rf "$bloopDir"
mkdir "$bloopDir"

wget -O $bloopDir/install.py https://github.com/scalacenter/bloop/releases/download/v$(bloop_version)/install.py \
&& python $bloopDir/install.py --dest $bloopDir

$bloopDir/bloop ng-stop
$bloopDir/bloop server &>/dev/null &

sbt "$1"
# sbt must be the last command - its exit code signals if tests passed or not