-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (41 loc) · 1.44 KB
/
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
46
47
48
name: Unit tests
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Compile and check scalafmt
env:
JAVA_OPTS: -Xmx4G -Xms4G -Xss2M
JVM_OPTS: -Xmx4G -Xms4G -Xss2M
run: sbt -Denv.type=test clean "test:compile" scalafmtCheckAll
- name: Run tests
env:
JAVA_OPTS: -Xmx4G -Xms4G -Xss2M
JVM_OPTS: -Xmx4G -Xms4G -Xss2M
run: |
export SBT_OPTS="-Duser.timezone=UTC -Denv.type=test"
sbt coverage test coverageReport
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Setup Cache
uses: coursier/cache-action@v5
- name: Cache resources
run: |
rm -rf "$HOME/.ivy2/local" || true
find $HOME/Library/Caches/Coursier/v1 -name "ivydata-*.properties" -delete || true
find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true
find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true
find $HOME/.sbt -name "*.lock" -delete || true