Skip to content

Commit

Permalink
use scala 3.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
austek committed Aug 22, 2024
1 parent 23cb4b8 commit 112124d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,19 +83,19 @@ jobs:
shell: bash
run: sbt '++ ${{ matrix.scala }}' consumer/test

- name: pact-publish help
- name: Pact publish Windows
if: contains(runner.os, 'windows')
shell: bash
run: pact-broker.bat publish "modules/examples/consumer/target/pacts" --consumer-app-version=${{ runner.os }}.${{ github.sha }}

- name: pact-publish help
- name: Pact publish *nix
if: '!contains(runner.os, ''windows'')'
shell: bash
run: pact-broker publish "modules/examples/consumer/target/pacts" --consumer-app-version=${{ runner.os }}.${{ github.sha }}

- name: Test Provider
shell: bash
run: sbt '++ ${{ matrix.scala }}' -Dpactbroker.url=${PACT_BROKER_BASE_URL} -Dpactbroker.auth.username=${PACT_BROKER_USERNAME} -Dpactbroker.auth.password=${PACT_BROKER_PASSWORD} provider/test
run: sbt '++ ${{ matrix.scala }}' -Dpactbroker.url=${PACT_BROKER_BASE_URL} =${PACT_BROKER_USERNAME} =${PACT_BROKER_PASSWORD} provider/test

- name: Compress target directories
shell: bash
Expand Down
7 changes: 7 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ import TestEnvironment.*

ThisBuild / scalaVersion := scalaV

lazy val pactOptions: Seq[Tests.Argument] = Seq(
Some(sys.env.getOrElse("PACT_BROKER_BASE_URL", "http://localhost:9292")).map(s => s"-Dpactbroker.url=$s"),
sys.env.get("PACT_BROKER_USERNAME").map(s => s"-Dpactbroker.auth.username=$s"),
sys.env.get("PACT_BROKER_PASSWORD").map(s => s"-Dpactbroker.auth.password=$s")
).flatten.map(o => Tests.Argument(jupiterTestFramework, o))

lazy val plugin = project
.in(file("modules/plugin"))
.enablePlugins(
Expand Down Expand Up @@ -41,6 +47,7 @@ lazy val provider = project
basicSettings,
Test / sbt.Keys.test := (Test / sbt.Keys.test).dependsOn(pluginRef / buildTestPluginDir).value,
Test / envVars := Map("PACT_PLUGIN_DIR" -> ((pluginRef / target).value / "plugin").absolutePath),
testOptions ++= pactOptions,
libraryDependencies ++=
Dependencies.compile(avroCompiler, logback, pulsar4sCore, pulsar4sAvro, scalacheck) ++
Dependencies.test(assertJCore, jUnitInterface, pactProviderJunit),
Expand Down
8 changes: 4 additions & 4 deletions github-actions.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ThisBuild / githubWorkflowBuild := Seq(
commands = List("consumer/test")
),
WorkflowStep.Run(
name = Some("pact-publish help"),
name = Some("Pact publish Windows"),
commands = List(
"""pact-broker.bat publish
| "modules/examples/consumer/target/pacts"
Expand All @@ -38,7 +38,7 @@ ThisBuild / githubWorkflowBuild := Seq(
cond = Some("contains(runner.os, 'windows')")
),
WorkflowStep.Run(
name = Some("pact-publish help"),
name = Some("Pact publish *nix"),
commands = List(
"""pact-broker publish
| "modules/examples/consumer/target/pacts"
Expand All @@ -50,8 +50,8 @@ ThisBuild / githubWorkflowBuild := Seq(
name = Some("Test Provider"),
commands = List(
"-Dpactbroker.url=${PACT_BROKER_BASE_URL}",
"-Dpactbroker.auth.username=${PACT_BROKER_USERNAME}",
"-Dpactbroker.auth.password=${PACT_BROKER_PASSWORD}",
"=${PACT_BROKER_USERNAME}",
"=${PACT_BROKER_PASSWORD}",
"provider/test"
)
)
Expand Down

0 comments on commit 112124d

Please sign in to comment.