Improved CI - check fmt #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI-quality | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: coursier/cache-action@v6 | ||
extraKey: quality-check | ||
Check failure on line 16 in .github/workflows/ci-quality.yml GitHub Actions / CI-qualityInvalid workflow file
|
||
- uses: coursier/setup-action@v1 | ||
jvm: zulu:8 | ||
- name: ScalaFmt | ||
id: fmt | ||
run: sbt scalafmtCheckAll | ||
- name: Compilation or tests failed | ||
if: ${{steps.fmt.conclusion == 'failure' }} | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
github.rest.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: 'The code needs to be formated. Run "sbt scalafmtAll" from the command line in the root of your project or "scalafmtAll" from the sbt cli and push again.' | ||
}) |