diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 0000000..b5ca820 --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,26 @@ +name: Scalafmt + +on: + pull_request: + branches: ['**'] + +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + +jobs: + build: + name: Code is formatted + strategy: + matrix: + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout current branch (full) + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Check project is formatted + uses: jrouly/scalafmt-native-action@v1 + with: + version: '3.4.3' diff --git a/build.sbt b/build.sbt index 0b0bbfb..e4f67ab 100644 --- a/build.sbt +++ b/build.sbt @@ -34,7 +34,6 @@ organizationName := "Lightbend Inc." startYear := Some(2018) enablePlugins(AutomateHeaderPlugin) -scalafmtOnCompile := true ThisBuild / githubWorkflowTargetTags ++= Seq("v*") ThisBuild / githubWorkflowPublishTargetBranches :=