-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bf69c6d
commit d1da6ea
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Scala CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'adopt' | ||
java-version: '11' | ||
|
||
- name: Cache SBT dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.sbt | ||
~/.ivy2 | ||
key: ${{ runner.os }}-sbt-${{ hashFiles('**/*.sbt', '**/project/build.properties') }} | ||
restore-keys: | | ||
${{ runner.os }}-sbt- | ||
- name: Install Scalafmt | ||
run: | | ||
curl -Ls https://get.scalafmt.org | bash -s -- --version 2.7.5 | ||
- name: Check code formatting with Scalafmt | ||
run: sbt scalafmtCheck | ||
|
||
- name: Build and test with SBT | ||
run: sbt test | ||
|