-
Notifications
You must be signed in to change notification settings - Fork 43
45 lines (38 loc) · 1.11 KB
/
build-test.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
name: Build and Test
on:
pull_request:
push:
branches:
- master
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
build-and-test:
runs-on: ubuntu-22.04
timeout-minutes: 15
env:
SBT_OPTS: -Dfile.encoding=UTF-8 -Duser.timezone=UTC
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Cache Coursier
uses: coursier/[email protected]
- name: Setup JDK
uses: coursier/[email protected]
with:
jvm: adoptium:1.8
- name: Test Code Style
run: |
sbt --client "+scalariformFormat; +test:scalariformFormat"
git diff --exit-code || (
echo "ERROR: Scalariform check failed, see differences above."
echo "To fix, format your sources using sbt scalariformFormat test:scalariformFormat before submitting a pull request."
false
)
- name: Build
timeout-minutes: 10
run: |
sbt --client "+clean; +compile; +Test/compile; +test;"