Skip to content

Commit

Permalink
Updates, etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
travisbrown committed Jun 21, 2021
1 parent 0657558 commit 9101aa7
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 30 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ name: Continuous Integration

on:
pull_request:
branches: ['*']
branches: ['**']
push:
branches: ['*']
branches: ['**']

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -32,7 +32,7 @@ jobs:
fetch-depth: 0

- name: Setup Java and Scala
uses: olafurpg/setup-scala@v10
uses: olafurpg/setup-scala@v12
with:
java-version: ${{ matrix.java }}

Expand All @@ -49,9 +49,9 @@ jobs:
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Check that workflows are up to date
run: sbt ++${{ matrix.scala }} githubWorkflowCheck
run: sbt --client '++${{ matrix.scala }}; githubWorkflowCheck'

- name: test
run: sbt ++${{ matrix.scala }} clean coverage test coverageReport
run: sbt --client '++${{ matrix.scala }}; clean; coverage; test; coverageReport'

- uses: codecov/codecov-action@v1
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
.cache/
.history/
.lib/
.bsp/
dist/*
target/
lib_managed/
Expand Down
10 changes: 10 additions & 0 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version=2.7.5
align.openParenCallSite = true
align.openParenDefnSite = true
maxColumn = 120
continuationIndent.defnSite = 2
assumeStandardLibraryStripMargin = true
danglingParentheses.preset = true
rewrite.rules = [AvoidInfix, SortImports, RedundantParens, SortModifiers]
docstrings = JavaDoc
newlines.alwaysBeforeMultilineDef = false
42 changes: 20 additions & 22 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
import ReleaseTransformations._

crossScalaVersions in ThisBuild := Seq("2.12.14", "2.13.6")
scalaVersion in ThisBuild := crossScalaVersions.value.last
githubWorkflowJavaVersions in ThisBuild := Seq("[email protected]")
githubWorkflowPublishTargetBranches in ThisBuild := Nil
githubWorkflowBuild in ThisBuild := Seq(
ThisBuild / crossScalaVersions := Seq("2.12.14", "2.13.6")
ThisBuild / scalaVersion := crossScalaVersions.value.last
ThisBuild / githubWorkflowJavaVersions := Seq("[email protected]")
ThisBuild / githubWorkflowPublishTargetBranches := Nil
ThisBuild / githubWorkflowBuild := Seq(
WorkflowStep.Sbt(
List("clean", "coverage", "test", "coverageReport"),
id = None,
name = Some("test")
),
WorkflowStep.Use(
"codecov",
"codecov-action",
"v1"
UseRef.Public(
"codecov",
"codecov-action",
"v1"
)
)
)

Expand All @@ -34,29 +36,26 @@ lazy val commonSettings = Seq(
libraryDependencies ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, n)) if n < 13 =>
Seq(
compilerPlugin(
"org.scalamacros" %% "paradise" % "2.1.1" cross CrossVersion.full))
Seq(compilerPlugin(("org.scalamacros" %% "paradise" % "2.1.1").cross(CrossVersion.full)))
case _ => Seq.empty
}
},
homepage := Some(url("https://github.com/aishfenton/Argus")),
licenses := Seq(
"MIT License" -> url("http://www.opensource.org/licenses/MIT")),
licenses := Seq("MIT License" -> url("http://www.opensource.org/licenses/MIT")),
// NB: We put example schemas in main package since otherwise the macros can't run for test (since they
// execute before test-classes is populated). But then we need to exclude them from packing.
mappings in (Compile, packageBin) ~= {
Compile / packageBin / mappings ~= {
_.filter(!_._1.getName.endsWith(".json"))
},
publishMavenStyle := true,
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value)
Some("snapshots" at nexus + "content/repositories/snapshots")
Some("snapshots".at(nexus + "content/repositories/snapshots"))
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
Some("releases".at(nexus + "service/local/staging/deploy/maven2"))
},
publishArtifact in Test := false,
Test / publishArtifact := false,
pomIncludeRepository := (_ => false),
sonatypeProfileName := "com.github.aishfenton",
pomExtra :=
Expand Down Expand Up @@ -90,12 +89,10 @@ lazy val commonSettings = Seq(
setReleaseVersion,
commitReleaseVersion,
tagRelease,
ReleaseStep(action = Command.process("publishSigned", _),
enableCrossBuild = true),
ReleaseStep(action = Command.process("publishSigned", _), enableCrossBuild = true),
setNextVersion,
commitNextVersion,
ReleaseStep(action = Command.process("sonatypeReleaseAll", _),
enableCrossBuild = true),
ReleaseStep(action = Command.process("sonatypeReleaseAll", _), enableCrossBuild = true),
pushChanges
)
)
Expand Down Expand Up @@ -126,7 +123,8 @@ lazy val runtime = project
.settings(moduleName := "circe-argus-runtime")
.settings(commonSettings: _*)

lazy val root = (project in file("."))
lazy val root = project
.in(file("."))
.aggregate(argus, runtime)
.settings(commonSettings: _*)
.settings(noPublishSettings: _*)
Expand Down
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
logLevel := Level.Warn

addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.9.5")
addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.12.0")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.7")
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.0.15")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.8.2")

2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version in ThisBuild := "0.3.0-SNAPSHOT"
ThisBuild / version := "0.3.0-SNAPSHOT"

0 comments on commit 9101aa7

Please sign in to comment.