forked from iandebeer/gleibnif
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.05 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Scala CI
on:
workflow_dispatch:
push:
branches:
- "master"
pull_request:
branches:
- "master"
concurrency:
group: scala-ci-${{ github.ref }}
cancel-in-progress: true
jobs:
compile:
name: Compile
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
# Caching dependencies for faster build
- name: Cache SBT
uses: actions/cache@v4
with:
path: |
~/.ivy2/cache
~/.sbt
~/.coursier
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }}
restore-keys: |
${{ runner.os }}-sbt-
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: 17
distribution: "zulu"
- name: Check Scala formatting with Scalafmt
run: sbt scalafmtCheckAll
- name: Check import organization
run: sbt "scalafix --check OrganizeImports"
- name: Compile with SBT
run: sbt compile