pr #10
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: pr | |
on: pull_request | |
jobs: | |
compile: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.sbt | |
~/.coursier | |
key: ${{ runner.os }}-sbt-${{ hashfiles('**/build.sbt') }} | |
- name: Ensure successful compilation | |
run: sbt compile | |
formatting: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.sbt | |
~/.coursier | |
key: ${{ runner.os }}-sbt-${{ hashfiles('**/build.sbt') }} | |
- name: Check formatting | |
run: sbt scalafmtCheck | |
- run: echo "Previous step failed because code is not formatted. Run 'sbt scalafmt'" | |
if: ${{ failure() }} |