From 83acce680959772c0d5245f9379c2d9b3ede4097 Mon Sep 17 00:00:00 2001 From: Jason Pickens Date: Wed, 24 Mar 2021 22:21:30 +1300 Subject: [PATCH 1/2] Use sbtn for the build steps --- .github/workflows/ci.yml | 22 +++++++++++++++++----- build.sbt | 15 ++++++++++++++- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d8839aa..b1b06cd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,14 +50,26 @@ jobs: key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} - name: Check that workflows are up to date - run: sbt ++${{ matrix.scala }} githubWorkflowCheck + run: sbtn ++${{ matrix.scala }} githubWorkflowCheck - - name: Build, test and check libraries - run: sbt ++${{ matrix.scala }} check + - name: Check formatting and style + run: sbtn ++${{ matrix.scala }} scalafmtCheckAll scalastyle + + - name: Check version adheres to the policy + run: sbtn ++${{ matrix.scala }} versionCheck versionPolicyCheck + + - name: Check documentation has been generated + run: sbtn ++${{ matrix.scala }} 'docs/mdoc --check' + + - name: Check dependencies + run: sbtn ++${{ matrix.scala }} evicted undeclaredCompileDependenciesTest unusedCompileDependenciesTest dependencyCheckAggregate + + - name: Build and test + run: sbtn ++${{ matrix.scala }} test - name: Build and test sbt plugin if: matrix.scala == '2.12.13' - run: sbt ++${{ matrix.scala }} scripted + run: sbtn ++${{ matrix.scala }} scripted - name: Compress target directories run: tar cf targets.tar sbt/target meta/integration-tests/target target meta/docs/target cli/target core/target example/target project/target @@ -126,4 +138,4 @@ jobs: PGP_SECRET: ${{ secrets.PGP_SECRET }} SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} - run: sbt ++${{ matrix.scala }} ci-release \ No newline at end of file + run: sbtn ++${{ matrix.scala }} ci-release \ No newline at end of file diff --git a/build.sbt b/build.sbt index 2398a5f..3857aee 100644 --- a/build.sbt +++ b/build.sbt @@ -54,8 +54,21 @@ inThisBuild( licenses := List("MIT" -> url("https://github.com/BotTech/scala2plantuml/blob/main/LICENSE")), organization := "nz.co.bottech", organizationName := "BotTech", + githubWorkflowSbtCommand := "sbtn", githubWorkflowBuild := List( - WorkflowStep.Sbt(List("check"), name = Some("Build, test and check libraries")), + WorkflowStep.Sbt(List("scalafmtCheckAll", "scalastyle"), name = Some("Check formatting and style")), + WorkflowStep.Sbt(List("versionCheck", "versionPolicyCheck"), name = Some("Check version adheres to the policy")), + WorkflowStep.Sbt(List("docs/mdoc --check"), name = Some("Check documentation has been generated")), + WorkflowStep.Sbt( + List( + "evicted", + "undeclaredCompileDependenciesTest", + "unusedCompileDependenciesTest", + "dependencyCheckAggregate" + ), + name = Some("Check dependencies") + ), + WorkflowStep.Sbt(List("test"), name = Some("Build and test")), WorkflowStep.Sbt( List("scripted"), name = Some("Build and test sbt plugin"), From 23c48dec6ae611162219f74cf1a433bb9d905d8b Mon Sep 17 00:00:00 2001 From: Jason Pickens Date: Wed, 24 Mar 2021 22:32:28 +1300 Subject: [PATCH 2/2] Use sbt client mode --- .github/workflows/ci.yml | 16 ++++++++-------- build.sbt | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b1b06cd..75cbd06 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,26 +50,26 @@ jobs: key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} - name: Check that workflows are up to date - run: sbtn ++${{ matrix.scala }} githubWorkflowCheck + run: sbt --client ++${{ matrix.scala }} githubWorkflowCheck - name: Check formatting and style - run: sbtn ++${{ matrix.scala }} scalafmtCheckAll scalastyle + run: sbt --client ++${{ matrix.scala }} scalafmtCheckAll scalastyle - name: Check version adheres to the policy - run: sbtn ++${{ matrix.scala }} versionCheck versionPolicyCheck + run: sbt --client ++${{ matrix.scala }} versionCheck versionPolicyCheck - name: Check documentation has been generated - run: sbtn ++${{ matrix.scala }} 'docs/mdoc --check' + run: sbt --client ++${{ matrix.scala }} 'docs/mdoc --check' - name: Check dependencies - run: sbtn ++${{ matrix.scala }} evicted undeclaredCompileDependenciesTest unusedCompileDependenciesTest dependencyCheckAggregate + run: sbt --client ++${{ matrix.scala }} evicted undeclaredCompileDependenciesTest unusedCompileDependenciesTest dependencyCheckAggregate - name: Build and test - run: sbtn ++${{ matrix.scala }} test + run: sbt --client ++${{ matrix.scala }} test - name: Build and test sbt plugin if: matrix.scala == '2.12.13' - run: sbtn ++${{ matrix.scala }} scripted + run: sbt --client ++${{ matrix.scala }} scripted - name: Compress target directories run: tar cf targets.tar sbt/target meta/integration-tests/target target meta/docs/target cli/target core/target example/target project/target @@ -138,4 +138,4 @@ jobs: PGP_SECRET: ${{ secrets.PGP_SECRET }} SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} - run: sbtn ++${{ matrix.scala }} ci-release \ No newline at end of file + run: sbt --client ++${{ matrix.scala }} ci-release \ No newline at end of file diff --git a/build.sbt b/build.sbt index 3857aee..5a1ec3b 100644 --- a/build.sbt +++ b/build.sbt @@ -54,7 +54,7 @@ inThisBuild( licenses := List("MIT" -> url("https://github.com/BotTech/scala2plantuml/blob/main/LICENSE")), organization := "nz.co.bottech", organizationName := "BotTech", - githubWorkflowSbtCommand := "sbtn", + githubWorkflowSbtCommand := "sbt --client", githubWorkflowBuild := List( WorkflowStep.Sbt(List("scalafmtCheckAll", "scalastyle"), name = Some("Check formatting and style")), WorkflowStep.Sbt(List("versionCheck", "versionPolicyCheck"), name = Some("Check version adheres to the policy")),