Skip to content

Commit

Permalink
Various Scala Steward updates backported for the 2.x branch (#157)
Browse files Browse the repository at this point in the history
* Update sbt-github-actions to 0.14.2

* update JVM vendor and Scala 2.13 version

* Update sbt to 1.5.6 (#154)

Co-authored-by: Scala Steward <[email protected]>
Co-authored-by: Scala Steward <[email protected]>
  • Loading branch information
3 people authored Dec 13, 2021
1 parent 99e8c8b commit f44f071
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 31 deletions.
53 changes: 35 additions & 18 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: ['**']
tags: [v*]

env:
Expand All @@ -23,19 +23,28 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.13.6, 2.12.15]
java: [adopt@1.8, adopt@1.11]
scala: [2.13.7, 2.12.15]
java: [temurin@8, temurin@11]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Java and Scala
uses: olafurpg/setup-scala@v10
- name: Setup Java (temurin@8)
if: matrix.java == 'temurin@8'
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: temurin
java-version: 8

- name: Setup Java (temurin@11)
if: matrix.java == 'temurin@11'
uses: actions/setup-java@v2
with:
distribution: temurin
java-version: 11

- name: Cache sbt
uses: actions/cache@v2
Expand All @@ -52,8 +61,7 @@ jobs:
- name: Check that workflows are up to date
run: sbt ++${{ matrix.scala }} githubWorkflowCheck

- name: Build project
run: sbt ++${{ matrix.scala }} test
- run: sbt ++${{ matrix.scala }} test doc

- name: Compress target directories
run: tar cf targets.tar core/js/target target main/target lambda-io-app/js/target aws-java-sdk2/target core/jvm/target test-kit/target lambda-io-app/jvm/target project/target
Expand All @@ -71,19 +79,28 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.13.6]
java: [adopt@1.8]
scala: [2.13.7]
java: [temurin@8]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Java and Scala
uses: olafurpg/setup-scala@v10
- name: Setup Java (temurin@8)
if: matrix.java == 'temurin@8'
uses: actions/setup-java@v2
with:
distribution: temurin
java-version: 8

- name: Setup Java (temurin@11)
if: matrix.java == 'temurin@11'
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: temurin
java-version: 11

- name: Cache sbt
uses: actions/cache@v2
Expand All @@ -97,12 +114,12 @@ jobs:
~/Library/Caches/Coursier/v1
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Download target directories (2.13.6)
- name: Download target directories (2.13.7)
uses: actions/download-artifact@v2
with:
name: target-${{ matrix.os }}-2.13.6-${{ matrix.java }}
name: target-${{ matrix.os }}-2.13.7-${{ matrix.java }}

- name: Inflate target directories (2.13.6)
- name: Inflate target directories (2.13.7)
run: |
tar xf targets.tar
rm targets.tar
Expand All @@ -122,4 +139,4 @@ jobs:
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
run: sbt ++${{ matrix.scala }} ci-release
run: sbt ++${{ matrix.scala }} ci-release
2 changes: 1 addition & 1 deletion .github/workflows/clean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ jobs:
printf "Deleting '%s' #%d, %'d bytes\n" $name ${ARTCOUNT[$name]} $size
ghapi -X DELETE $REPO/actions/artifacts/$id
done
done
done
16 changes: 8 additions & 8 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
queue_rules:
- name: default
conditions:
- status-success=Build and Test (ubuntu-latest, 2.13.6, adopt@1.8)
- status-success=Build and Test (ubuntu-latest, 2.13.6, adopt@1.11)
- status-success=Build and Test (ubuntu-latest, 2.12.15, adopt@1.8)
- status-success=Build and Test (ubuntu-latest, 2.12.15, adopt@1.11)
- status-success=Build and Test (ubuntu-latest, 2.13.7, temurin@8)
- status-success=Build and Test (ubuntu-latest, 2.13.7, temurin@11)
- status-success=Build and Test (ubuntu-latest, 2.12.15, temurin@8)
- status-success=Build and Test (ubuntu-latest, 2.12.15, temurin@11)

pull_request_rules:
- name: assign and label scala-steward's PRs
Expand All @@ -25,10 +25,10 @@ pull_request_rules:
- name: merge scala-steward's PRs
conditions:
- author=scala-steward
- status-success=Build and Test (ubuntu-latest, 2.13.6, adopt@1.8)
- status-success=Build and Test (ubuntu-latest, 2.13.6, adopt@1.11)
- status-success=Build and Test (ubuntu-latest, 2.12.15, adopt@1.8)
- status-success=Build and Test (ubuntu-latest, 2.12.15, adopt@1.11)
- status-success=Build and Test (ubuntu-latest, 2.13.7, temurin@8)
- status-success=Build and Test (ubuntu-latest, 2.13.7, temurin@11)
- status-success=Build and Test (ubuntu-latest, 2.12.15, temurin@8)
- status-success=Build and Test (ubuntu-latest, 2.12.15, temurin@11)
actions:
queue:
method: squash
Expand Down
5 changes: 3 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ inThisBuild(List(
url("https://dwolla.com")
)
),
crossScalaVersions := Seq("2.13.6", "2.12.15"),
crossScalaVersions := Seq("2.13.7", "2.12.15"),
scalaVersion := crossScalaVersions.value.head,
startYear := Option(2018),
libraryDependencies ++= {
Expand All @@ -26,7 +26,8 @@ inThisBuild(List(
},
resolvers += Resolver.sonatypeRepo("releases"),

githubWorkflowJavaVersions := Seq("[email protected]", "[email protected]"),
githubWorkflowBuild := Seq(WorkflowStep.Sbt(List("test", "doc"))),
githubWorkflowJavaVersions := Seq(JavaSpec.temurin("8"), JavaSpec.temurin("11")),
githubWorkflowTargetTags ++= Seq("v*"),
githubWorkflowPublishTargetBranches :=
Seq(RefPredicate.StartsWith(Ref.Tag("v"))),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import org.mockito.Mockito._
import org.mockito.invocation.InvocationOnMock

import scala.reflect.ClassTag
import scala.annotation.nowarn

object AmazonAsyncMockingImplicits {

Expand Down Expand Up @@ -73,6 +74,7 @@ object AmazonAsyncMockingImplicits {
*/
implicit class AmazonAsyncResults[Req <: AmazonWebServiceRequest : ClassTag, Res](responseMapping: Map[Req, Either[Exception, Res]]) {

@nowarn("""msg=the type test for pattern com\.amazonaws\.handlers\.AsyncHandler\[Req,Res\] cannot be checked at runtime because it has type parameters eliminated by erasure""")
def completes(func: (Req, AsyncHandler[Req, Res]) => JFuture[Res]): Unit = {
when(func(any[Req], any[AsyncHandler[Req, Res]])) thenAnswer ((invocation: InvocationOnMock) => {
invocation.getArguments match {
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version = 1.5.5
sbt.version = 1.5.6
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.7.1")
addSbtPlugin("org.portable-scala" % "sbt-crossproject" % "1.1.0")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.1.0")
addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.20")
addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.10.1")
addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.14.2")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.10")

addSbtPlugin("org.scalablytyped.converter" % "sbt-converter" % "1.0.0-beta36")

0 comments on commit f44f071

Please sign in to comment.