All Projects β†’ dwijnand β†’ sbt-travisci

dwijnand / sbt-travisci

Licence: Apache-2.0 license
An sbt plugin to integrate with Travis CI

Programming Languages

scala
5932 projects
shell
77523 projects

Projects that are alternatives of or similar to sbt-travisci

plugin.video.sendtokodi
πŸ“Ί plays various stream sites on kodi using youtube-dl
Stars: ✭ 86 (+95.45%)
Mutual labels:  travis-ci, travis
travis-deploy-once
🚫Test multiple node versions on Travis. Deploy once. If all of them pass.
Stars: ✭ 34 (-22.73%)
Mutual labels:  travis-ci, travis
Sbt Dynver
An sbt plugin to dynamically set your version from git
Stars: ✭ 243 (+452.27%)
Mutual labels:  sbt, sbt-plugin
sbt-rewarn
Make sbt always display compilation warnings, even for unchanged files.
Stars: ✭ 42 (-4.55%)
Mutual labels:  sbt, sbt-plugin
fetch-action-creator
Fetches using standardized, four-part asynchronous actions for redux-thunk.
Stars: ✭ 28 (-36.36%)
Mutual labels:  travis-ci, travis
Sbt Tpolecat
scalac options for the enlightened
Stars: ✭ 227 (+415.91%)
Mutual labels:  sbt, sbt-plugin
sbt-ghpages
git, site and ghpages support for sbt projects.
Stars: ✭ 94 (+113.64%)
Mutual labels:  sbt, sbt-plugin
Sbt Docker Compose
Integrates Docker Compose functionality into sbt
Stars: ✭ 168 (+281.82%)
Mutual labels:  sbt, sbt-plugin
sbt-sass
A fork of the sbt-sass repository which seems to be abandoned.
Stars: ✭ 32 (-27.27%)
Mutual labels:  sbt, sbt-plugin
sbt-sonar
An sbt plugin which provides an easy way to integrate Scala projects with SonarQube.
Stars: ✭ 62 (+40.91%)
Mutual labels:  sbt, sbt-plugin
sbt-swagger-2
sbt plugin for generating Swagger JSON schemas during build
Stars: ✭ 13 (-70.45%)
Mutual labels:  sbt, sbt-plugin
sbt-findbugs
FindBugs static analysis plugin for sbt.
Stars: ✭ 47 (+6.82%)
Mutual labels:  sbt, sbt-plugin
Sbt Dependency Check
SBT Plugin for OWASP DependencyCheck. Monitor your dependencies and report if there are any publicly known vulnerabilities (e.g. CVEs). 🌈
Stars: ✭ 187 (+325%)
Mutual labels:  sbt, sbt-plugin
Sbt Fresh
sbt-plugin to create an opinionated fresh sbt project
Stars: ✭ 229 (+420.45%)
Mutual labels:  sbt, sbt-plugin
Sbt Crossproject
Cross-platform compilation support for sbt.
Stars: ✭ 176 (+300%)
Mutual labels:  sbt, sbt-plugin
vagrant-travisci-libvrt
Example project showing how to run Vagrant on TravisCI using libvrt & KVM
Stars: ✭ 25 (-43.18%)
Mutual labels:  travis-ci, travis
Gatling Sbt Plugin Demo
Showcase of the Gatling Plugin for SBT
Stars: ✭ 137 (+211.36%)
Mutual labels:  sbt, sbt-plugin
Sbt Protobuf
sbt plugin for compiling protobuf files
Stars: ✭ 163 (+270.45%)
Mutual labels:  sbt, sbt-plugin
sbt-babel
An SBT plugin to perform Babel compilation.
Stars: ✭ 12 (-72.73%)
Mutual labels:  sbt, sbt-plugin
sbt-graphql
SBT plugin to generate and validate graphql schemas written with Sangria
Stars: ✭ 94 (+113.64%)
Mutual labels:  sbt, sbt-plugin

sbt-travisci travis-badge gitter-badge

sbt-travisci is an sbt plugin to integrate with Travis CI.

Original idea from @djspiewak in his djspiewak/base.g8 template.

Setup

Add this to your sbt build plugins, in either project/plugins.sbt or project/travisci.sbt:

addSbtPlugin("com.dwijnand" % "sbt-travisci" % "1.2.0")

Then make sure to NOT set the crossScalaVersions setting, otherwise you will override sbt-travisci.

Other than that, as sbt-travisci is an AutoPlugin that is all that is required.

Detail

  • isTravisBuild in Global will be automatically be set to true if the current build is running under Travis CI.
  • travisPrNumber in Global will be automatically set to the number of the pull request, in case the build is a pull request build. Otherwise, it will have a value of None.
  • crossScalaVersions in ThisBuild will be automatically set to the scala versions in .travis.yml, falling back (with warnings) to the value of crossScalaVersions in Global if it can't be found or parsed properly.
  • scalaVersion in ThisBuild will be automatically set to TRAVIS_SCALA_VERSION if isTravisBuild is true, otherwise to the last version in crossScalaVersions, and so by default, sbt will assume you want to develop under the last version listed in .travis.yml.
  • scala212 in ThisBuild will be automatically set to the unique 2.12.x version in .travis.yml, or "no-2.12-version" if none set and "multiple-2.12-versions" (with a warning log) if multiple set. Same for scala210, scala211, and scala213.
  • crossSbtVersions in ThisBuild will be automatically set to the TRAVIS_SBT_VERSIONs in env properties in .travis.yml, falling back (with warnings) to the value of crossSbtVersions in Global if it can't be found or parsed properly.
  • sbtVersion in ThisBuild will be automatically set to TRAVIS_SBT_VERSION if isTravisBuild is true, otherwise to the last version in crossSbtVersions, and so by default, sbt will assume you want to develop under the last version listed in .travis.yml.

Example

Given a .travis.yml of:

scala:
  - 2.11.8
  - 2.12.0

scalaVersion in ThisBuild will be "2.12.0".

Sanity checking a scala version key

As a sanity check, you can stop the build from loading by running a check during sbt's onLoad. For instance, to make sure that scala212 is defines a scala version you can use:

Global / onLoad := (Global / onLoad).value.andThen { s =>
  val v = scala212.value
  if (!CrossVersion.isScalaApiCompatible(v))
    throw new MessageOnlyException(
      s"Key scala212 doesn't define a scala version. Check .travis.yml is setup right. Version: $v"
    )
  s
}

This will return an error message like the following:

[error] Key scala212 doesn't define a scala version. Check .travis.yml is setup right. Version: no-2.12-version

Licence

Copyright 2016 Dale Wijnand

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].