From df186d4b612258513b9acaa8380ae2c2b35bcabc Mon Sep 17 00:00:00 2001 From: Nabil Abdel-Hafeez <7283535+987Nabil@users.noreply.github.com> Date: Tue, 29 Oct 2024 17:20:32 +0100 Subject: [PATCH] Install sbt in workflows (#3192) --- .github/workflows/ci.yml | 174 +++++++++++++++++++---------- .github/workflows/site.yml | 5 +- build.sbt | 7 +- project/BenchmarkWorkFlow.scala | 6 +- project/JmhBenchmarkWorkflow.scala | 13 ++- project/ScoverageWorkFlow.scala | 5 +- 6 files changed, 138 insertions(+), 72 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 35ee3d8b82..252ff31afc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,6 +77,8 @@ jobs: java-version: 21 cache: sbt + - uses: coursier/setup-action@v1 + - name: Check formatting if: matrix.scala == '2.13.14' run: sbt ++2.13.14 fmtCheck @@ -87,6 +89,8 @@ jobs: - name: Build project run: sbt '++ ${{ matrix.scala }}' test + - uses: coursier/setup-action@v1 + - name: Check doc generation if: ${{ github.event_name == 'pull_request' }} run: sbt ++2.13.14 doc @@ -229,11 +233,12 @@ jobs: java: [temurin@21] runs-on: ${{ matrix.os }} steps: - - name: Checkout current branch (full) - uses: actions/checkout@v4 + - uses: actions/checkout@v4 with: fetch-depth: 0 + - uses: coursier/setup-action@v1 + - name: Setup Java (temurin@21) if: matrix.java == 'temurin@21' uses: actions/setup-java@v4 @@ -253,11 +258,14 @@ jobs: java: [temurin@8] runs-on: ${{ matrix.os }} steps: - - name: Checkout current branch (full) - uses: actions/checkout@v4 + - uses: actions/checkout@v4 with: fetch-depth: 0 + - uses: coursier/setup-action@v1 + with: + apps: sbt + - name: Add Scoverage id: add_plugin run: sed -i -e '$aaddSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.12")' project/plugins.sbt @@ -286,11 +294,15 @@ jobs: java: [temurin@8] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: coursier/setup-action@v1 + with: + apps: sbt + + - uses: actions/checkout@v4 with: path: zio-http - - uses: actions/setup-java@v2 + - uses: actions/setup-java@v4 with: distribution: temurin java-version: 11 @@ -305,7 +317,7 @@ jobs: cat > Main_CachedDateHeaderBenchmark.txt sbt -no-colors -v "zioHttpBenchmarks/jmh:run -i 3 -wi 3 -f1 -t1 CachedDateHeaderBenchmark" | grep -e "thrpt" -e "avgt" >> ../Main_CachedDateHeaderBenchmark.txt - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: Jmh_Main_CachedDateHeaderBenchmark path: Main_CachedDateHeaderBenchmark.txt @@ -320,11 +332,15 @@ jobs: java: [temurin@8] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: coursier/setup-action@v1 + with: + apps: sbt + + - uses: actions/checkout@v4 with: path: zio-http - - uses: actions/setup-java@v2 + - uses: actions/setup-java@v4 with: distribution: temurin java-version: 11 @@ -339,7 +355,7 @@ jobs: cat > Main_ClientBenchmark.txt sbt -no-colors -v "zioHttpBenchmarks/jmh:run -i 3 -wi 3 -f1 -t1 ClientBenchmark" | grep -e "thrpt" -e "avgt" >> ../Main_ClientBenchmark.txt - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: Jmh_Main_ClientBenchmark path: Main_ClientBenchmark.txt @@ -354,11 +370,15 @@ jobs: java: [temurin@8] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: coursier/setup-action@v1 + with: + apps: sbt + + - uses: actions/checkout@v4 with: path: zio-http - - uses: actions/setup-java@v2 + - uses: actions/setup-java@v4 with: distribution: temurin java-version: 11 @@ -373,7 +393,7 @@ jobs: cat > Main_CookieDecodeBenchmark.txt sbt -no-colors -v "zioHttpBenchmarks/jmh:run -i 3 -wi 3 -f1 -t1 CookieDecodeBenchmark" | grep -e "thrpt" -e "avgt" >> ../Main_CookieDecodeBenchmark.txt - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: Jmh_Main_CookieDecodeBenchmark path: Main_CookieDecodeBenchmark.txt @@ -388,11 +408,15 @@ jobs: java: [temurin@8] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: coursier/setup-action@v1 + with: + apps: sbt + + - uses: actions/checkout@v4 with: path: zio-http - - uses: actions/setup-java@v2 + - uses: actions/setup-java@v4 with: distribution: temurin java-version: 11 @@ -407,7 +431,7 @@ jobs: cat > Main_EndpointBenchmark.txt sbt -no-colors -v "zioHttpBenchmarks/jmh:run -i 3 -wi 3 -f1 -t1 EndpointBenchmark" | grep -e "thrpt" -e "avgt" >> ../Main_EndpointBenchmark.txt - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: Jmh_Main_EndpointBenchmark path: Main_EndpointBenchmark.txt @@ -422,11 +446,15 @@ jobs: java: [temurin@8] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: coursier/setup-action@v1 + with: + apps: sbt + + - uses: actions/checkout@v4 with: path: zio-http - - uses: actions/setup-java@v2 + - uses: actions/setup-java@v4 with: distribution: temurin java-version: 11 @@ -441,7 +469,7 @@ jobs: cat > Main_HttpCollectEval.txt sbt -no-colors -v "zioHttpBenchmarks/jmh:run -i 3 -wi 3 -f1 -t1 HttpCollectEval" | grep -e "thrpt" -e "avgt" >> ../Main_HttpCollectEval.txt - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: Jmh_Main_HttpCollectEval path: Main_HttpCollectEval.txt @@ -456,11 +484,15 @@ jobs: java: [temurin@8] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: coursier/setup-action@v1 + with: + apps: sbt + + - uses: actions/checkout@v4 with: path: zio-http - - uses: actions/setup-java@v2 + - uses: actions/setup-java@v4 with: distribution: temurin java-version: 11 @@ -475,7 +507,7 @@ jobs: cat > Main_HttpCombineEval.txt sbt -no-colors -v "zioHttpBenchmarks/jmh:run -i 3 -wi 3 -f1 -t1 HttpCombineEval" | grep -e "thrpt" -e "avgt" >> ../Main_HttpCombineEval.txt - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: Jmh_Main_HttpCombineEval path: Main_HttpCombineEval.txt @@ -490,11 +522,15 @@ jobs: java: [temurin@8] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: coursier/setup-action@v1 + with: + apps: sbt + + - uses: actions/checkout@v4 with: path: zio-http - - uses: actions/setup-java@v2 + - uses: actions/setup-java@v4 with: distribution: temurin java-version: 11 @@ -509,7 +545,7 @@ jobs: cat > Main_HttpNestedFlatMapEval.txt sbt -no-colors -v "zioHttpBenchmarks/jmh:run -i 3 -wi 3 -f1 -t1 HttpNestedFlatMapEval" | grep -e "thrpt" -e "avgt" >> ../Main_HttpNestedFlatMapEval.txt - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: Jmh_Main_HttpNestedFlatMapEval path: Main_HttpNestedFlatMapEval.txt @@ -524,11 +560,15 @@ jobs: java: [temurin@8] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: coursier/setup-action@v1 + with: + apps: sbt + + - uses: actions/checkout@v4 with: path: zio-http - - uses: actions/setup-java@v2 + - uses: actions/setup-java@v4 with: distribution: temurin java-version: 11 @@ -543,7 +583,7 @@ jobs: cat > Main_HttpRouteTextPerf.txt sbt -no-colors -v "zioHttpBenchmarks/jmh:run -i 3 -wi 3 -f1 -t1 HttpRouteTextPerf" | grep -e "thrpt" -e "avgt" >> ../Main_HttpRouteTextPerf.txt - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: Jmh_Main_HttpRouteTextPerf path: Main_HttpRouteTextPerf.txt @@ -558,11 +598,15 @@ jobs: java: [temurin@8] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: coursier/setup-action@v1 + with: + apps: sbt + + - uses: actions/checkout@v4 with: path: zio-http - - uses: actions/setup-java@v2 + - uses: actions/setup-java@v4 with: distribution: temurin java-version: 11 @@ -577,7 +621,7 @@ jobs: cat > Main_ProbeContentTypeBenchmark.txt sbt -no-colors -v "zioHttpBenchmarks/jmh:run -i 3 -wi 3 -f1 -t1 ProbeContentTypeBenchmark" | grep -e "thrpt" -e "avgt" >> ../Main_ProbeContentTypeBenchmark.txt - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: Jmh_Main_ProbeContentTypeBenchmark path: Main_ProbeContentTypeBenchmark.txt @@ -592,11 +636,15 @@ jobs: java: [temurin@8] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: coursier/setup-action@v1 + with: + apps: sbt + + - uses: actions/checkout@v4 with: path: zio-http - - uses: actions/setup-java@v2 + - uses: actions/setup-java@v4 with: distribution: temurin java-version: 11 @@ -611,7 +659,7 @@ jobs: cat > Main_SchemeDecodeBenchmark.txt sbt -no-colors -v "zioHttpBenchmarks/jmh:run -i 3 -wi 3 -f1 -t1 SchemeDecodeBenchmark" | grep -e "thrpt" -e "avgt" >> ../Main_SchemeDecodeBenchmark.txt - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: Jmh_Main_SchemeDecodeBenchmark path: Main_SchemeDecodeBenchmark.txt @@ -626,11 +674,15 @@ jobs: java: [temurin@8] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: coursier/setup-action@v1 + with: + apps: sbt + + - uses: actions/checkout@v4 with: path: zio-http - - uses: actions/setup-java@v2 + - uses: actions/setup-java@v4 with: distribution: temurin java-version: 11 @@ -645,7 +697,7 @@ jobs: cat > Main_ServerInboundHandlerBenchmark.txt sbt -no-colors -v "zioHttpBenchmarks/jmh:run -i 3 -wi 3 -f1 -t1 ServerInboundHandlerBenchmark" | grep -e "thrpt" -e "avgt" >> ../Main_ServerInboundHandlerBenchmark.txt - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: Jmh_Main_ServerInboundHandlerBenchmark path: Main_ServerInboundHandlerBenchmark.txt @@ -660,11 +712,15 @@ jobs: java: [temurin@8] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: coursier/setup-action@v1 + with: + apps: sbt + + - uses: actions/checkout@v4 with: path: zio-http - - uses: actions/setup-java@v2 + - uses: actions/setup-java@v4 with: distribution: temurin java-version: 11 @@ -679,7 +735,7 @@ jobs: cat > Main_UtilBenchmark.txt sbt -no-colors -v "zioHttpBenchmarks/jmh:run -i 3 -wi 3 -f1 -t1 UtilBenchmark" | grep -e "thrpt" -e "avgt" >> ../Main_UtilBenchmark.txt - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: Jmh_Main_UtilBenchmark path: Main_UtilBenchmark.txt @@ -695,91 +751,91 @@ jobs: java: [temurin@8] runs-on: ${{ matrix.os }} steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: Jmh_Main_CachedDateHeaderBenchmark - name: Format_Main_CachedDateHeaderBenchmark run: cat Main_CachedDateHeaderBenchmark.txt >> Main_benchmarks.txt - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: Jmh_Main_ClientBenchmark - name: Format_Main_ClientBenchmark run: cat Main_ClientBenchmark.txt >> Main_benchmarks.txt - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: Jmh_Main_CookieDecodeBenchmark - name: Format_Main_CookieDecodeBenchmark run: cat Main_CookieDecodeBenchmark.txt >> Main_benchmarks.txt - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: Jmh_Main_EndpointBenchmark - name: Format_Main_EndpointBenchmark run: cat Main_EndpointBenchmark.txt >> Main_benchmarks.txt - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: Jmh_Main_HttpCollectEval - name: Format_Main_HttpCollectEval run: cat Main_HttpCollectEval.txt >> Main_benchmarks.txt - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: Jmh_Main_HttpCombineEval - name: Format_Main_HttpCombineEval run: cat Main_HttpCombineEval.txt >> Main_benchmarks.txt - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: Jmh_Main_HttpNestedFlatMapEval - name: Format_Main_HttpNestedFlatMapEval run: cat Main_HttpNestedFlatMapEval.txt >> Main_benchmarks.txt - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: Jmh_Main_HttpRouteTextPerf - name: Format_Main_HttpRouteTextPerf run: cat Main_HttpRouteTextPerf.txt >> Main_benchmarks.txt - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: Jmh_Main_ProbeContentTypeBenchmark - name: Format_Main_ProbeContentTypeBenchmark run: cat Main_ProbeContentTypeBenchmark.txt >> Main_benchmarks.txt - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: Jmh_Main_SchemeDecodeBenchmark - name: Format_Main_SchemeDecodeBenchmark run: cat Main_SchemeDecodeBenchmark.txt >> Main_benchmarks.txt - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: Jmh_Main_ServerInboundHandlerBenchmark - name: Format_Main_ServerInboundHandlerBenchmark run: cat Main_ServerInboundHandlerBenchmark.txt >> Main_benchmarks.txt - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: Jmh_Main_UtilBenchmark - name: Format_Main_UtilBenchmark run: cat Main_UtilBenchmark.txt >> Main_benchmarks.txt - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: path: zio-http @@ -814,11 +870,11 @@ jobs: GITHUB_TOKEN: ${{secrets.ACTIONS_PAT}} run: sudo rm -rf * - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: path: zio-http - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: repository: khajavi/FrameworkBenchmarks path: FrameworkBenchMarks @@ -872,7 +928,7 @@ jobs: if (( REQUESTS_PER_SECOND > PERFORMANCE_FLOOR )); then echo "Woohoo! Performance is good! $REQUESTS_PER_SECOND requests/sec exceeds the performance floor of $PERFORMANCE_FLOOR requests/sec." - else + else echo "Performance benchmark failed with $REQUESTS_PER_SECOND req/sec! Performance must exceed $PERFORMANCE_FLOOR req/sec." exit 1 fi @@ -893,11 +949,11 @@ jobs: GITHUB_TOKEN: ${{secrets.ACTIONS_PAT}} run: sudo rm -rf * - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: path: zio-http - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: repository: khajavi/FrameworkBenchmarks path: FrameworkBenchMarks @@ -951,7 +1007,7 @@ jobs: if (( REQUESTS_PER_SECOND > PERFORMANCE_FLOOR )); then echo "Woohoo! Performance is good! $REQUESTS_PER_SECOND requests/sec exceeds the performance floor of $PERFORMANCE_FLOOR requests/sec." - else + else echo "Performance benchmark failed with $REQUESTS_PER_SECOND req/sec! Performance must exceed $PERFORMANCE_FLOOR req/sec." exit 1 fi diff --git a/.github/workflows/site.yml b/.github/workflows/site.yml index 027da47ab4..f8bc4e9ef6 100644 --- a/.github/workflows/site.yml +++ b/.github/workflows/site.yml @@ -1,4 +1,4 @@ -# This file was autogenerated using `zio-sbt-website` via `sbt generateGithubWorkflow` +# This file was autogenerated using `zio-sbt-website` via `sbt generateGithubWorkflow` # task and should be included in the git repository. Please do not edit it manually. name: Website @@ -23,6 +23,7 @@ jobs: uses: actions/checkout@v3.3.0 with: fetch-depth: '0' + - uses: coursier/setup-action@v1 - name: Setup Scala uses: actions/setup-java@v3.9.0 with: @@ -48,6 +49,7 @@ jobs: distribution: temurin java-version: 17 check-latest: true + - uses: coursier/setup-action@v1 - name: Setup NodeJs uses: actions/setup-node@v3 with: @@ -67,6 +69,7 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: '0' + - uses: coursier/setup-action@v1 - name: Install libuv run: sudo apt-get update && sudo apt-get install -y libuv1-dev - name: Setup Scala diff --git a/build.sbt b/build.sbt index e2ad47a064..c35a4dd9fb 100644 --- a/build.sbt +++ b/build.sbt @@ -38,7 +38,10 @@ ThisBuild / githubWorkflowAddedJobs := WorkflowJob( id = "mima_check", name = "Mima Check", - steps = WorkflowStep.CheckoutFull +: WorkflowStep.SetupJava(List(JavaSpec.temurin("21"))) :+ WorkflowStep.Sbt(List("mimaChecks")), + steps = List( + WorkflowStep.Use(UseRef.Public("actions", "checkout", "v4"), Map("fetch-depth" -> "0")), + WorkflowStep.Use(UseRef.Public("coursier", "setup-action", "v1")), + ) ++ WorkflowStep.SetupJava(List(JavaSpec.temurin("21"))) :+ WorkflowStep.Sbt(List("mimaChecks")), cond = Option("${{ github.event_name == 'pull_request' }}"), javas = List(JavaSpec.temurin("21")), ), @@ -75,6 +78,7 @@ ThisBuild / githubWorkflowPublish := //scala fix isn't available for scala 3 so ensure we only run the fmt check //using the latest scala 2.13 ThisBuild / githubWorkflowBuildPreamble := Seq( + WorkflowStep.Use(UseRef.Public("coursier", "setup-action", "v1")), WorkflowStep.Run( name = Some("Check formatting"), commands = List(s"sbt ++${Scala213} fmtCheck"), @@ -87,6 +91,7 @@ ThisBuild / githubWorkflowBuildPostamble := "checkDocGeneration", "Check doc generation", List( + WorkflowStep.Use(UseRef.Public("coursier", "setup-action", "v1")), WorkflowStep.Run( commands = List(s"sbt ++${Scala213} doc"), name = Some("Check doc generation"), diff --git a/project/BenchmarkWorkFlow.scala b/project/BenchmarkWorkFlow.scala index dd2f01bde5..25cf7edaeb 100644 --- a/project/BenchmarkWorkFlow.scala +++ b/project/BenchmarkWorkFlow.scala @@ -35,13 +35,13 @@ object BenchmarkWorkFlow { commands = List("sudo rm -rf *"), ), WorkflowStep.Use( - UseRef.Public("actions", "checkout", s"v2"), + UseRef.Public("actions", "checkout", s"v4"), Map( "path" -> "zio-http", ), ), WorkflowStep.Use( - UseRef.Public("actions", "checkout", s"v2"), + UseRef.Public("actions", "checkout", s"v4"), Map( "repository" -> "khajavi/FrameworkBenchmarks", "path" -> "FrameworkBenchMarks", @@ -103,7 +103,7 @@ object BenchmarkWorkFlow { |if (( REQUESTS_PER_SECOND > PERFORMANCE_FLOOR )); then | echo "Woohoo! Performance is good! $REQUESTS_PER_SECOND requests/sec exceeds the performance floor of $PERFORMANCE_FLOOR requests/sec." - |else + |else | echo "Performance benchmark failed with $REQUESTS_PER_SECOND req/sec! Performance must exceed $PERFORMANCE_FLOOR req/sec." | exit 1 |fi""".stripMargin, diff --git a/project/JmhBenchmarkWorkflow.scala b/project/JmhBenchmarkWorkflow.scala index abb3a1b580..c49c17c5ea 100644 --- a/project/JmhBenchmarkWorkflow.scala +++ b/project/JmhBenchmarkWorkflow.scala @@ -11,7 +11,7 @@ object JmhBenchmarkWorkflow { Glob("zio-http-benchmarks/src/main/scala-2.13/**"), Glob("zio-http-benchmarks/src/main/scala/**")),scalaSources ) - + /** * Get zioHttpBenchmark file names */ @@ -45,7 +45,7 @@ object JmhBenchmarkWorkflow { def downloadArtifacts(branch: String, batchSize: Int) = groupedBenchmarks(batchSize).flatMap(l => { Seq( WorkflowStep.Use( - ref = UseRef.Public("actions", "download-artifact", "v3"), + ref = UseRef.Public("actions", "download-artifact", "v4"), Map( "name" -> s"Jmh_${branch}_${l.head}", ), @@ -84,7 +84,7 @@ object JmhBenchmarkWorkflow { steps = downloadArtifacts("Main", batchSize) ++ Seq( WorkflowStep.Use( - UseRef.Public("actions", "checkout", "v2"), + UseRef.Public("actions", "checkout", "v4"), Map( "path" -> "zio-http" ) @@ -113,14 +113,15 @@ object JmhBenchmarkWorkflow { ), scalas = List(Scala213), steps = List( + WorkflowStep.Use(UseRef.Public("coursier", "setup-action","v1"), Map("apps" -> "sbt")), WorkflowStep.Use( - UseRef.Public("actions", "checkout", "v2"), + UseRef.Public("actions", "checkout", "v4"), Map( "path" -> "zio-http", ), ), WorkflowStep.Use( - UseRef.Public("actions", "setup-java", "v2"), + UseRef.Public("actions", "setup-java", "v4"), Map( "distribution" -> "temurin", "java-version" -> "11", @@ -137,7 +138,7 @@ object JmhBenchmarkWorkflow { name = Some("Benchmark_Main"), ), WorkflowStep.Use( - UseRef.Public("actions", "upload-artifact", "v3"), + UseRef.Public("actions", "upload-artifact", "v4"), Map( "name" -> s"Jmh_Main_${l.head}", "path" -> s"Main_${l.head}.txt", diff --git a/project/ScoverageWorkFlow.scala b/project/ScoverageWorkFlow.scala index 54d677a727..e623d94a44 100644 --- a/project/ScoverageWorkFlow.scala +++ b/project/ScoverageWorkFlow.scala @@ -1,5 +1,5 @@ import BuildHelper.{Scala213, ScoverageVersion} -import sbtghactions.GenerativePlugin.autoImport.{WorkflowJob, WorkflowStep} +import sbtghactions.GenerativePlugin.autoImport.{UseRef, WorkflowJob, WorkflowStep} object ScoverageWorkFlow { // TODO move plugins to plugins.sbt after scoverage's support for Scala 3 @@ -15,7 +15,8 @@ object ScoverageWorkFlow { name = "Unsafe Scoverage", scalas = List(Scala213), steps = List( - WorkflowStep.CheckoutFull, + WorkflowStep.Use(UseRef.Public("actions", "checkout", "v4"), Map("fetch-depth" -> "0")), + WorkflowStep.Use(UseRef.Public("coursier", "setup-action","v1"), Map("apps" -> "sbt")), WorkflowStep.Run( commands = List(s"sed -i -e '$$a${scoveragePlugin}' project/plugins.sbt"), id = Some("add_plugin"),