-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (50 loc) · 1.6 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
49
50
51
52
53
54
55
56
57
58
name: Continuous Integration
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Cache SBT ivy cache
uses: actions/cache@v3
with:
path: ~/.ivy2/cache
key: ${{ runner.os }}-ivy-${{ github.run_number }}
restore-keys: ${{ runner.os }}-ivy-
- name: Cache SBT
uses: actions/cache@v3
with:
path: ~/.sbt
key: ${{ runner.os }}-sbt-${{ github.run_number }}
restore-keys: ${{ runner.os }}-sbt-
- name: Cache coursier cache
uses: actions/cache@v3
with:
path: ~/.cache/coursier
key: ${{ runner.os }}-coursier-${{ github.run_number }}
restore-keys: ${{ runner.os }}-coursier-
- name: Cache project
uses: actions/cache@v3
with:
path: ./
key: ${{ runner.os }}-project-${{ github.run_number }}
restore-keys: ${{ runner.os }}-project-
- name: Checkout current
run: git checkout . && git clean -df
- name: Run tests
run: sbt cachedCiTest
- name: Clean caches
run: |
rm -fv ~/.ivy2/.sbt.ivy.lock
find ~/.ivy2/cache -name "ivydata-*.properties" -print -delete || echo "empty ivy cache"
find ~/.sbt -name "*.lock" -print -delete
rm -rf ./.git
rm -rf ./project/target #clean doesn't clean meta-build