Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various CI fixes, including avoiding push as a CI trigger #417

Merged
merged 4 commits into from
Apr 19, 2024
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
19 changes: 11 additions & 8 deletions .github/workflows/testonpush.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
name: Test on push

name: CI
on:
workflow_dispatch:
pull_request:

# triggering CI default branch improves caching
# see https://docs.github.com/en/free-pro-team@latest/actions/guides/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache
push:
branches: [ "**" ]
workflow_dispatch: {}
branches:
- main

jobs:
test:
Expand All @@ -15,10 +19,10 @@ jobs:
pull-requests: write

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: corretto
java-version: 11
Expand All @@ -27,11 +31,10 @@ jobs:
- name: Test
env:
CAPI_TEST_KEY: ${{ secrets.CAPI_TEST_KEY }}
SBT_JUNIT_OUTPUT: ./junit-tests
JAVA_OPTS: -XX:+UseCompressedOops
run: sbt test

- uses: EnricoMi/publish-unit-test-result-action@v2
if: always() #runs even if there is a test failure
with:
files: junit-tests/*.xml
files: test-results/**/TEST-*.xml
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ lazy val root = (project in file("."))
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
Expand Down Expand Up @@ -61,5 +62,4 @@ lazy val defaultClientSettings: Seq[Setting[_]] = Seq(
"""
)


Test / testOptions += Tests.Argument(TestFrameworks.ScalaTest, "-u", sys.env.getOrElse("SBT_JUNIT_OUTPUT", "junit"))
Test / testOptions += Tests.Argument(TestFrameworks.ScalaTest, "-u", s"test-results/scala-${scalaVersion.value}", "-o")
Loading