diff --git a/.github/workflows/build-test-prValidation.yml b/.github/workflows/build-test-prValidation.yml index 8cdeb7e270..f1f53223d6 100644 --- a/.github/workflows/build-test-prValidation.yml +++ b/.github/workflows/build-test-prValidation.yml @@ -9,8 +9,8 @@ concurrency: cancel-in-progress: true jobs: - check-code-style: - name: Check / Code Style + check-headers: + name: Check / Headers runs-on: ubuntu-20.04 steps: - name: Checkout @@ -27,12 +27,12 @@ jobs: - name: Cache Coursier cache uses: coursier/cache-action@v6.2 - - name: Code style check + - name: Check headers run: |- sbt -jvm-opts .jvmopts-ci \ -Dsbt.override.build.repos=false \ -Dsbt.log.noformat=false \ - verifyCodeStyle + headerCheckAll pull-request-validation: name: Check / Tests diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 0000000000..9ce98e557c --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,24 @@ +name: Scalafmt + +permissions: read-all + +on: + pull_request: + branches: ['**'] + +jobs: + build: + name: Code is formatted + runs-on: ubuntu-latest + steps: + - name: Checkout current branch (full) + uses: actions/checkout@v2 + with: + fetch-depth: 0 + persist-credentials: false + + - name: Check project is formatted + uses: jrouly/scalafmt-native-action@v2 + with: + version: '3.6.1' + arguments: '--list --mode diff-ref=origin/main'