Skip to content

Commit

Permalink
ci: Enable 2.13 build for scalajs and linting in travis (#3106)
Browse files Browse the repository at this point in the history
* ci: Build JS for scala 2.13 in Travis

* ci: check formatting for scala 2.13 as well
  • Loading branch information
DieBauer authored and kailuowang committed Oct 10, 2019
1 parent e91aa24 commit ca591fc
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
9 changes: 6 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,20 @@ stages:
jobs:
include:
# it can speed up the overall build to have the longer-running jobs at the top of this list.
- stage: test
- stage: test
env: TEST="coverage"
install: pip install --user codecov
script: sbt coverage buildJVM bench/test coverageReport && codecov

- stage: test
- &js_tests
stage: test
env: TEST="JS tests"
# http://austinpray.com/ops/2015/09/20/change-travis-node-version.html
install: rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION
script: sbt ++$TRAVIS_SCALA_VERSION! validateJS && sbt ++$TRAVIS_SCALA_VERSION! validateKernelJS && sbt ++$TRAVIS_SCALA_VERSION! validateFreeJS
scala: *scala_version_212
- <<: *js_tests
scala: *scala_version_213

- &jvm_tests
stage: test
Expand Down Expand Up @@ -67,7 +70,7 @@ jobs:

- stage: styling
env: TEST="linting"
script: sbt fmtCheck
script: sbt +fmtCheck

- stage: publish snapshot
script: |
Expand Down
3 changes: 2 additions & 1 deletion core/src/main/scala-2.13+/cats/instances/lazyList.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import cats.data.ZipLazyList
import scala.annotation.tailrec

trait LazyListInstances extends cats.kernel.instances.LazyListInstances {
implicit val catsStdInstancesForLazyList: Traverse[LazyList] with Alternative[LazyList] with Monad[LazyList] with CoflatMap[LazyList] =
implicit val catsStdInstancesForLazyList
: Traverse[LazyList] with Alternative[LazyList] with Monad[LazyList] with CoflatMap[LazyList] =
new Traverse[LazyList] with Alternative[LazyList] with Monad[LazyList] with CoflatMap[LazyList] {

def empty[A]: LazyList[A] = LazyList.empty
Expand Down
3 changes: 2 additions & 1 deletion core/src/main/scala-2.13+/cats/instances/stream.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import scala.annotation.tailrec
trait StreamInstances extends cats.kernel.instances.StreamInstances {

@deprecated("Use cats.instances.lazyList", "2.0.0-RC2")
implicit val catsStdInstancesForStream: Traverse[Stream] with Alternative[Stream] with Monad[Stream] with CoflatMap[Stream] =
implicit val catsStdInstancesForStream
: Traverse[Stream] with Alternative[Stream] with Monad[Stream] with CoflatMap[Stream] =
new Traverse[Stream] with Alternative[Stream] with Monad[Stream] with CoflatMap[Stream] {

def empty[A]: Stream[A] = Stream.Empty
Expand Down
11 changes: 10 additions & 1 deletion tests/src/test/scala-2.13+/cats/tests/LazyListSuite.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
package cats
package tests

import cats.laws.discipline.{AlternativeTests, CoflatMapTests, CommutativeApplyTests, MonadTests, SemigroupalTests, SerializableTests, TraverseFilterTests, TraverseTests}
import cats.laws.discipline.{
AlternativeTests,
CoflatMapTests,
CommutativeApplyTests,
MonadTests,
SemigroupalTests,
SerializableTests,
TraverseFilterTests,
TraverseTests
}
import cats.data.ZipLazyList
import cats.laws.discipline.arbitrary._
import org.scalatest.funsuite.AnyFunSuiteLike
Expand Down

0 comments on commit ca591fc

Please sign in to comment.