-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dependencies update and GitHub Actions Configuration (#607)
* Dependencies update and GitHub Actions Configuration * Add .sbtopts * Run JDK11 tests only * Corss Scala warnings fix * Configure CI release * Configure dependabot
- Loading branch information
Showing
17 changed files
with
170 additions
and
296 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: CI | ||
on: | ||
pull_request: | ||
branches: ['**'] | ||
push: | ||
branches: ['**'] | ||
tags: [v*] | ||
jobs: | ||
build: | ||
name: Build and Test | ||
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'stac-utils/stac4s' | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
java: [11] | ||
distribution: [temurin] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: coursier/cache-action@v6 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: ${{ matrix.distribution }} | ||
java-version: ${{ matrix.java }} | ||
|
||
- name: Check formatting | ||
run: sbt ";scalafix --check; scalafmtCheck; scalafmtSbtCheck; scapegoat;" | ||
|
||
- name: Build project | ||
run: sbt +test | ||
|
||
publish: | ||
name: Publish Artifacts | ||
needs: [build] | ||
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
java: [8] | ||
distribution: [temurin] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: coursier/cache-action@v6 | ||
- uses: actions/setup-java@v2 | ||
with: | ||
distribution: ${{ matrix.distribution }} | ||
java-version: ${{ matrix.java }} | ||
|
||
- name: Release | ||
run: sbt ci-release | ||
env: | ||
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} | ||
PGP_SECRET: ${{ secrets.PGP_SECRET }} | ||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
if: ${{ env.SONATYPE_PASSWORD != '' && env.SONATYPE_USERNAME != '' }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-J-Xmx2g | ||
-J-Xms64m | ||
-J-Xss2M | ||
-J-XX:+UseG1GC | ||
-J-XX:+UseStringDeduplication | ||
-J-XX:+UseCompressedOops | ||
-Dfile.encoding=UTF8 | ||
-Djava.awt.headless=true | ||
-Dsun.io.serialization.extendedDebugInfo=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
modules/client/shared/src/main/scala-2.12/com/azavea/stac4s/api/client/ETagCodecs.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.azavea.stac4s.api.client | ||
|
||
import io.circe.generic.semiauto.{deriveDecoder, deriveEncoder} | ||
import io.circe.refined._ | ||
import io.circe.{Decoder, Encoder} | ||
|
||
trait ETagCodecs { | ||
implicit def encoderETag[T: Encoder]: Encoder[ETag[T]] = deriveEncoder | ||
implicit def decoderETag[T: Decoder]: Decoder[ETag[T]] = deriveDecoder | ||
} |
12 changes: 12 additions & 0 deletions
12
modules/client/shared/src/main/scala-2.13/com/azavea/stac4s/api/client/ETagCodecs.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.azavea.stac4s.api.client | ||
|
||
import io.circe.generic.semiauto.{deriveDecoder, deriveEncoder} | ||
import io.circe.refined._ | ||
import io.circe.{Decoder, Encoder} | ||
|
||
import scala.annotation.unused | ||
|
||
trait ETagCodecs { | ||
implicit def encoderETag[T](implicit @unused e: Encoder[T]): Encoder[ETag[T]] = deriveEncoder | ||
implicit def decoderETag[T](implicit @unused d: Decoder[T]): Decoder[ETag[T]] = deriveDecoder | ||
} |
10 changes: 1 addition & 9 deletions
10
modules/client/shared/src/main/scala/com/azavea/stac4s/api/client/ETag.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,7 @@ | ||
package com.azavea.stac4s.api.client | ||
|
||
import eu.timepit.refined.types.string.NonEmptyString | ||
import io.circe.generic.semiauto.{deriveDecoder, deriveEncoder} | ||
import io.circe.refined._ | ||
import io.circe.{Decoder, Encoder} | ||
|
||
import scala.annotation.nowarn | ||
|
||
case class ETag[T](entity: T, tag: Option[NonEmptyString]) | ||
|
||
object ETag { | ||
@nowarn implicit def encoderETag[T: Encoder]: Encoder[ETag[T]] = deriveEncoder | ||
@nowarn implicit def decoderETag[T: Decoder]: Decoder[ETag[T]] = deriveDecoder | ||
} | ||
object ETag extends ETagCodecs |
Oops, something went wrong.