Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Before submitting pull request:
- [ ] Check if the project compiles by running `sbt compile`
- [ ] Verify docs compilation by running `sbt compileDocs`
- [ ] Check if tests pass by running `sbt test`
- [ ] Check if tests pass by running `sbt testFull`
- [ ] Format code by running `sbt scalafmt`
26 changes: 13 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
matrix:
scala-version: [ "2.12", "2.13", "3" ]
target-platform: [ "JVM", "JS", "Native" ]
java: [ "11", "21" ]
java: [ "17", "21" ]
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -32,7 +32,7 @@ jobs:
distribution: 'temurin'
cache: 'sbt'
java-version: ${{ matrix.java }}
- uses: sbt/setup-sbt@3e125ece5c3e5248e18da9ed8d2cce3d335ec8dd # v1, specifically v1.1.14
- uses: sbt/setup-sbt@ce95da69b39609ea153bad087708da5f37366897 # v1, specifically v1.5.10
- name: Install libidn2-dev libcurl3-dev
if: matrix.target-platform == 'Native'
run: |
Expand Down Expand Up @@ -61,18 +61,18 @@ jobs:
- name: Compile
run: sbt -v "compileScoped ${{ matrix.scala-version }} ${{ matrix.target-platform }}"
- name: Compile documentation
if: matrix.target-platform == 'JVM' && matrix.java == '11'
if: matrix.target-platform == 'JVM' && matrix.java == '17'
run: sbt -v compileDocs
- name: Verify that examples compile using Scala CLI
if: matrix.target-platform == 'JVM' && matrix.java == '21' && matrix.scala-version == '3'
run: sbt $SBT_JAVA_OPTS -v "project examples3" verifyExamplesCompileUsingScalaCli
run: sbt -v examples/verifyExamplesCompileUsingScalaCli
- name: Verify that examples-ce2 compile using Scala CLI
if: matrix.target-platform == 'JVM' && matrix.java == '11' && matrix.scala-version == '2.13'
run: sbt $SBT_JAVA_OPTS -v "project examplesCe2" verifyExamplesCompileUsingScalaCli
if: matrix.target-platform == 'JVM' && matrix.java == '17' && matrix.scala-version == '2.13'
run: sbt -v examplesCe22_13/verifyExamplesCompileUsingScalaCli
- name: Test
run: sbt -v "testScoped ${{ matrix.scala-version }} ${{ matrix.target-platform }}"
- name: Prepare release notes
if: matrix.java == '11'
if: matrix.java == '17'
uses: release-drafter/release-drafter@b1476f6e6eb133afa41ed8589daba6dc69b4d3f5 # v6, specifically v6.1.0
with:
config-name: release-drafter.yml
Expand All @@ -89,7 +89,7 @@ jobs:
runs-on: ubuntu-24.04
strategy:
matrix:
java: [ "11", "21" ]
java: [ "17", "21" ]
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -99,7 +99,7 @@ jobs:
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: 'sbt'
- uses: sbt/setup-sbt@3e125ece5c3e5248e18da9ed8d2cce3d335ec8dd # v1, specifically v1.1.14
- uses: sbt/setup-sbt@ce95da69b39609ea153bad087708da5f37366897 # v1, specifically v1.5.10
- name: Install libidn2-dev libcurl3-dev
run: |
sudo apt-get update
Expand All @@ -112,15 +112,15 @@ jobs:
cmake --build build -j $(nproc)
sudo cmake --install build
- name: Enable Native-specific modules
if: matrix.java == '11'
if: matrix.java == '17'
run: echo "STTP_NATIVE=1" >> $GITHUB_ENV
- name: Enable ZIO and Loom-specific modules
if: matrix.java == '21'
run: |
echo "WITH_ZIO=1" >> $GITHUB_ENV
echo "ONLY_LOOM=1" >> $GITHUB_ENV
- name: Compile
run: sbt compile
run: sbt "compile ; shutdown"
- name: Publish artifacts
run: sbt ci-release
env:
Expand All @@ -129,14 +129,14 @@ jobs:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
- name: Extract version from commit message
if: matrix.java == '11'
if: matrix.java == '17'
run: |
version=${GITHUB_REF/refs\/tags\/v/}
echo "VERSION=$version" >> $GITHUB_ENV
env:
COMMIT_MSG: ${{ github.event.head_commit.message }}
- name: Publish release notes
if: matrix.java == '11'
if: matrix.java == '17'
uses: release-drafter/release-drafter@b1476f6e6eb133afa41ed8589daba6dc69b4d3f5 # v6, specifically v6.1.0
with:
config-name: release-drafter.yml
Expand Down
8 changes: 7 additions & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,10 @@ fileOverride {
"glob:**/effects/ox/**" {
runner.dialect = scala3
}
}
"glob:**.sbt" {
runner.dialect = scala3
}
"glob:**/project/*.scala" {
runner.dialect = scala3
}
}
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Build commands
- Compile all: `sbt compile`
- Compile specific Scala version/platform: `sbt "compileScoped 3 JVM"` (options: 2.12, 2.13, 3 / JVM, JS, Native)
- Test all: `sbt test`
- Test all: `sbt testFull` (in sbt 2, `test` is incremental)
- Test specific: `sbt "testScoped 3 JVM"`
- Compile docs: `sbt compileDocs`

Expand All @@ -21,4 +21,4 @@

## Code style
- Follow existing patterns in the codebase
- Use `%%%` for cross-platform dependencies, `%%` for JVM-only
- Use `%%` for Scala dependencies (in sbt 2 it is platform-aware, so there's no need for `%%%`)
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import sttp.model.sse.ServerSentEvent
import sttp.client4.testing.ConvertToFuture
import sttp.client4.testing.streaming.StreamingTest

import scala.concurrent.Future
import scala.concurrent.duration._
import scala.concurrent.{Await, Future}

class AkkaHttpStreamingTest extends StreamingTest[Future, AkkaStreams] {
override val streams: AkkaStreams = AkkaStreams
Expand All @@ -19,6 +20,11 @@ class AkkaHttpStreamingTest extends StreamingTest[Future, AkkaStreams] {
override val backend: StreamBackend[Future, AkkaStreams] =
AkkaHttpBackend.usingActorSystem(actorSystem)

override protected def afterAll(): Unit = {
super.afterAll()
Await.result(actorSystem.terminate(), 5.seconds)
}

override implicit val convertToFuture: ConvertToFuture[Future] =
ConvertToFuture.future

Expand Down
Loading
Loading