Skip to content

Commit

Permalink
Merge pull request #4054 from armanbilge/topic/algebra-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
djspiewak authored Nov 28, 2021
2 parents 4fe86ad + da5595a commit 5706752
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ jobs:
if: matrix.platform == 'native'
run: sbt ++${{ matrix.scala }} alleycatsTestsNative/test

- name: Validate Algebra Laws Native
if: matrix.platform == 'native'
run: sbt ++${{ matrix.scala }} algebraLawsNative/test

- name: Validate JVM (scala 2)
if: matrix.platform == 'jvm' && (matrix.scala != '3.0.2')
run: sbt ++${{ matrix.scala }} buildJVM bench/test
Expand Down
27 changes: 22 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,11 @@ lazy val algebra = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.nativeSettings(commonNativeSettings)
.settings(testingDependencies)
.settings(
scalacOptions := {
if (isDotty.value)
scalacOptions.value.filterNot(Set("-Xfatal-warnings"))
else scalacOptions.value
},
libraryDependencies += "org.scalacheck" %%% "scalacheck" % scalaCheckVersion % Test
)

Expand All @@ -721,7 +726,14 @@ lazy val algebraLaws = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.settings(publishSettings)
.settings(disciplineDependencies)
.settings(testingDependencies)
.settings(Test / scalacOptions := (Test / scalacOptions).value.filter(_ != "-Xfatal-warnings"))
.settings(
scalacOptions := {
if (isDotty.value)
scalacOptions.value.filterNot(Set("-Xfatal-warnings"))
else scalacOptions.value
},
Test / scalacOptions := (Test / scalacOptions).value.filter(_ != "-Xfatal-warnings")
)
.jsSettings(commonJsSettings)
.jvmSettings(
commonJvmSettings ++ mimaSettings("algebra-laws") ++ Seq(
Expand Down Expand Up @@ -990,26 +1002,31 @@ addCommandAlias("buildCoreJVM", ";coreJVM/test")
addCommandAlias("buildTestsJVM", ";lawsJVM/test;testkitJVM/test;testsJVM/test;jvm/test")
addCommandAlias("buildFreeJVM", ";freeJVM/test")
addCommandAlias("buildAlleycatsJVM", ";alleycatsCoreJVM/test;alleycatsLawsJVM/test;alleycatsTestsJVM/test")
addCommandAlias("buildJVM", ";buildKernelJVM;buildCoreJVM;buildTestsJVM;buildFreeJVM;buildAlleycatsJVM")
addCommandAlias("buildAlgebraJVM", ";algebraJVM/test;algebraLawsJVM/test")
addCommandAlias("buildJVM", ";buildKernelJVM;buildCoreJVM;buildTestsJVM;buildFreeJVM;buildAlleycatsJVM;buildAlgebraJVM")
addCommandAlias("validateBC", ";binCompatTest/test;catsJVM/mimaReportBinaryIssues")
addCommandAlias("validateJVM", ";fmtCheck;buildJVM;bench/test;validateBC;makeMicrosite")
addCommandAlias("validateJS", ";testsJS/test;js/test")
addCommandAlias("validateKernelJS", "kernelLawsJS/test")
addCommandAlias("validateFreeJS", "freeJS/test")
addCommandAlias("validateAlleycatsJS", "alleycatsTestsJS/test")
addCommandAlias("validateAllJS", "all testsJS/test js/test kernelLawsJS/test freeJS/test alleycatsTestsJS/test")
addCommandAlias("validateAlgebraJS", "algebraLawsJS/test")
addCommandAlias("validateAllJS",
"all testsJS/test js/test kernelLawsJS/test freeJS/test alleycatsTestsJS/test algebraLawsJS/test"
)
addCommandAlias("validateNative", ";testsNative/test;native/test")
addCommandAlias("validateKernelNative", "kernelLawsNative/test")
addCommandAlias("validateFreeNative", "freeNative/test")
addCommandAlias("validateAlleycatsNative", "alleycatsTestsNative/test")
addCommandAlias("validateAlgebraNative", "algebraLawsNative/test")

val validateAllNativeAlias =
"all testsNative/test native/test kernelLawsNative/test freeNative/test alleycatsTestsNative/test"
"all testsNative/test native/test kernelLawsNative/test freeNative/test alleycatsTestsNative/test algebraLawsNative/test"
addCommandAlias("validateAllNative", validateAllNativeAlias)

addCommandAlias(
"validate",
";clean;validateJS;validateKernelJS;validateFreeJS;validateNative;validateKernelNative;validateFreeNative;validateJVM"
";clean;validateJS;validateKernelJS;validateFreeJS;validateAlleycatsJS;validateAlgebraJS;validateNative;validateKernelNative;validateFreeNative;validateAlgebraNative;validateJVM"
)

addCommandAlias("prePR", "fmt")
Expand Down

0 comments on commit 5706752

Please sign in to comment.