Skip to content

Commit

Permalink
Run tests on scala 3
Browse files Browse the repository at this point in the history
  • Loading branch information
cquiroz committed May 8, 2024
1 parent 89f4a76 commit 3e2ccf3
Show file tree
Hide file tree
Showing 9 changed files with 198 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
use flake
layout node
eval "$shellHook"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ tzdb/js/src/main/resources/
/threetenbp.iml
.metaserver/
project/metals.sbt
.direnv/
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ lazy val sbt_tzdb = project
.settings(
name := "sbt-tzdb",
libraryDependencies ++= Seq(
"io.github.cquiroz" %% "kuyfi" % "1.5.2",
"io.github.cquiroz" %% "kuyfi" % "1.5.3",
"org.apache.commons" % "commons-compress" % "1.24.0",
"com.eed3si9n" %% "gigahorse-okhttp" % "0.7.0",
"org.typelevel" %% "cats-core" % "2.10.0",
Expand Down
156 changes: 156 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
inputs = {
typelevel-nix.url = "github:typelevel/typelevel-nix";
nixpkgs.follows = "typelevel-nix/nixpkgs";
flake-utils.follows = "typelevel-nix/flake-utils";
};

outputs = { self, nixpkgs, flake-utils, typelevel-nix }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs-x86_64 = import nixpkgs { system = "x86_64-darwin"; };
scala-cli-overlay = final: prev: { scala-cli = pkgs-x86_64.scala-cli; };
pkgs = import nixpkgs {
inherit system;
overlays = [ typelevel-nix.overlay scala-cli-overlay ];
};
in {
devShell = pkgs.devshell.mkShell {
imports = [ typelevel-nix.typelevelShell ];
typelevelShell = {
nodejs.enable = true;
jdk.package = pkgs.jdk8;
};
};
}

);
}
8 changes: 4 additions & 4 deletions sbt-tzdb/src/sbt-test/sbt-tzdb/jvm/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name := "tzdb"
enablePlugins(TzdbPlugin)
enablePlugins(ScalaJSPlugin)

scalaVersion := "2.13.1"
scalaVersion := "2.13.14"

crossScalaVersions := Seq("2.13.1", "2.12.10")
crossScalaVersions := Seq("2.13.14", "2.12.10", "3.4.1")

tzdbPlatform := TzdbPlugin.Platform.Jvm

Expand All @@ -20,6 +20,6 @@ lazy val commonSettings = Seq(
)

libraryDependencies ++= Seq(
"org.portable-scala" %%% "portable-scala-reflect" % "1.0.0",
"io.github.cquiroz" %%% "scala-java-time" % "2.0.0-RC3"
("org.portable-scala" %%% "portable-scala-reflect" % "1.1.2").cross(CrossVersion.for3Use2_13),
"io.github.cquiroz" %%% "scala-java-time" % "2.5.0"
)
2 changes: 1 addition & 1 deletion sbt-tzdb/src/sbt-test/sbt-tzdb/jvm/project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
addSbtPlugin("io.github.cquiroz" % "sbt-tzdb" % sys.props.getOrElse("plugin.version", sys.error("'plugin.version' environment variable is not set")))

addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.32")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0")
6 changes: 3 additions & 3 deletions sbt-tzdb/src/sbt-test/sbt-tzdb/no-filtering/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name := "tzdb"
enablePlugins(TzdbPlugin)
enablePlugins(ScalaJSPlugin)

scalaVersion := "2.13.1"
scalaVersion := "2.13.14"

crossScalaVersions := Seq("2.13.1", "2.12.10")
crossScalaVersions := Seq("2.13.14", "2.12.10", "3.4.1")

val zonesFilterFn = {(z: String) => z == "America/Santiago" || z == "Pacific/Honolulu"}

Expand All @@ -22,5 +22,5 @@ lazy val commonSettings = Seq(
)

libraryDependencies ++= Seq(
"io.github.cquiroz" %%% "scala-java-time" % "2.0.0-RC3"
"io.github.cquiroz" %%% "scala-java-time" % "2.5.0"
)
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
addSbtPlugin("io.github.cquiroz" % "sbt-tzdb" % sys.props.getOrElse("plugin.version", sys.error("'plugin.version' environment variable is not set")))

addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.32")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0")

0 comments on commit 3e2ccf3

Please sign in to comment.