-
Notifications
You must be signed in to change notification settings - Fork 5
51 lines (46 loc) · 1.37 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: CI
on: [push]
env:
CI: true # disables SBT super shell which has problems with CI environments
jobs:
build:
name: Scala ${{ matrix.scala }}
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
scala: ['2.12', '2.13']
include:
- scala: '2.12'
scala-version: 2.12.15
- scala: '2.13'
scala-version: 2.13.6
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8 and SBT
uses: olafurpg/setup-scala@v13
with:
java-version: [email protected]
- name: Cache Coursier
uses: actions/cache@v1
with:
path: ~/.cache/coursier
key: ${{ runner.os }}-coursier-${{ hashFiles('**/*.sbt') }}
- name: Cache SBT ivy cache
uses: actions/cache@v1
with:
path: ~/.ivy2/cache
key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/build.sbt') }}
- name: Cache SBT
uses: actions/cache@v1
with:
path: ~/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }}
- name: Compile and check format
run: >-
sbt ++${{ matrix.scala-version }} scalafmtSbt Test/compile &&
git diff --exit-code
- name: Run tests
run: sbt -Dsbt.color=always ++${{ matrix.scala-version }} test
- name: Check mdoc for uncommitted changes
run: sbt -Dsbt.color=always "docs/mdoc --check"