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

Use sbtn for the build steps #28

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
22 changes: 17 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: sbt --client ++${{ matrix.scala }} githubWorkflowCheck

- name: Build, test and check libraries
run: sbt ++${{ matrix.scala }} check
- name: Check formatting and style
run: sbt --client ++${{ matrix.scala }} scalafmtCheckAll scalastyle

- name: Check version adheres to the policy
run: sbt --client ++${{ matrix.scala }} versionCheck versionPolicyCheck

- name: Check documentation has been generated
run: sbt --client ++${{ matrix.scala }} 'docs/mdoc --check'

- name: Check dependencies
run: sbt --client ++${{ matrix.scala }} evicted undeclaredCompileDependenciesTest unusedCompileDependenciesTest dependencyCheckAggregate

- name: Build and test
run: sbt --client ++${{ matrix.scala }} test

- name: Build and test sbt plugin
if: matrix.scala == '2.12.13'
run: sbt ++${{ 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
Expand Down Expand Up @@ -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
run: sbt --client ++${{ matrix.scala }} ci-release
15 changes: 14 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,21 @@ inThisBuild(
licenses := List("MIT" -> url("https://github.com/BotTech/scala2plantuml/blob/main/LICENSE")),
organization := "nz.co.bottech",
organizationName := "BotTech",
githubWorkflowSbtCommand := "sbt --client",
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"),
Expand Down