Skip to content
This repository was archived by the owner on Oct 10, 2023. It is now read-only.

Commit 15bd75d

Browse files
saeltzJannikArndt
andauthored
MOIA-29747: Use GitHub Actions (#52)
* Try GitHub Actions * Caching * Better caching & separate compile/test * Run sbt +test crosscompile * Run sbt +compile crosscompile * Use v2 of cache action Co-authored-by: Jannik Arndt <[email protected]>
1 parent 7892b68 commit 15bd75d

File tree

1 file changed

+79
-0
lines changed

1 file changed

+79
-0
lines changed

.github/workflows/buildAndTest.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Build & Test
2+
on: push
3+
4+
jobs:
5+
scalafmt:
6+
name: Check formatting
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: Cache SBT & ivy cache
11+
uses: actions/cache@v2
12+
with:
13+
path: |
14+
~/.ivy2/cache
15+
~/.sbt
16+
key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/build.sbt') }}-${{ hashFiles('**/plugins.sbt') }}-${{ hashFiles('**/build.properties') }}
17+
- name: Scalafmt
18+
run: sbt scalafmtCheckAll
19+
20+
compile:
21+
name: Compile
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v2
25+
- name: Cache SBT & ivy cache
26+
uses: actions/cache@v2
27+
with:
28+
path: |
29+
~/.ivy2/cache
30+
~/.sbt
31+
key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/build.sbt') }}-${{ hashFiles('**/plugins.sbt') }}-${{ hashFiles('**/build.properties') }}
32+
- name: Compile
33+
run: sbt +compile
34+
35+
test:
36+
name: Test
37+
runs-on: ubuntu-latest
38+
needs: compile
39+
steps:
40+
- uses: actions/checkout@v2
41+
- name: Cache SBT & ivy cache
42+
uses: actions/cache@v2
43+
with:
44+
path: |
45+
~/.ivy2/cache
46+
~/.sbt
47+
key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/build.sbt') }}-${{ hashFiles('**/plugins.sbt') }}-${{ hashFiles('**/build.properties') }}
48+
- name: Run tests
49+
run: sbt +test
50+
51+
examples:
52+
name: Compile Examples
53+
runs-on: ubuntu-latest
54+
steps:
55+
- uses: actions/checkout@v2
56+
- name: Cache SBT & ivy cache
57+
uses: actions/cache@v2
58+
with:
59+
path: |
60+
~/.ivy2/cache
61+
~/.sbt
62+
key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/build.sbt') }}-${{ hashFiles('**/plugins.sbt') }}-${{ hashFiles('**/build.properties') }}
63+
- name: Compile examples
64+
run: sbt it:compile
65+
66+
scapegoat:
67+
name: Scapegoat
68+
runs-on: ubuntu-latest
69+
steps:
70+
- uses: actions/checkout@v2
71+
- name: Cache SBT & ivy cache
72+
uses: actions/cache@v2
73+
with:
74+
path: |
75+
~/.ivy2/cache
76+
~/.sbt
77+
key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/build.sbt') }}-${{ hashFiles('**/plugins.sbt') }}-${{ hashFiles('**/build.properties') }}
78+
- name: Run scapegoat
79+
run: sbt scapegoat

0 commit comments

Comments
 (0)