-
Notifications
You must be signed in to change notification settings - Fork 92
63 lines (63 loc) · 1.89 KB
/
pr-checks.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
59
60
61
62
63
name: PR checks
on:
pull_request:
jobs:
test:
name: Test using JDK ${{matrix.java}} and Scala ${{matrix.scala}}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java: ['8', '11']
scala:
- 2.12.19
- 2.12.20
- 2.13.14
- 2.13.15
- 3.3.3
- 3.5.1
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: adopt
java-version: ${{matrix.java}}
- uses: actions/cache@v4
with:
path: ~/.ivy2/cache
key: ivy-${{hashFiles('**/*.sbt')}}-${{matrix.scala}}
restore-keys: ivy-
- uses: actions/cache@v4
with:
path: ~/.sbt
key: sbt-${{hashFiles('**/*.sbt')}}-${{hashFiles('project/build.properties')}}-${{matrix.scala}}
restore-keys: sbt-
- run: sbt ++${{matrix.scala}}! test
additional-checks:
name: Run additional checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 11
- uses: actions/cache@v4
with:
path: ~/.ivy2/cache
key: ivy-${{hashFiles('**/*.sbt')}}
restore-keys: ivy-
- uses: actions/cache@v4
with:
path: ~/.sbt
key: sbt-${{hashFiles('**/*.sbt')}}-${{hashFiles('project/build.properties')}}
restore-keys: sbt-
- name: Generate coverage report
run: sbt clean coverage test coverageReport
- uses: codecov/codecov-action@v4
- name: Run Scalafix check
run: sbt fixCheck
- name: Run Scapegoat
run: |
sbt 'set version := "99.0-SNAPSHOT"; publishLocal'
sbt -Dadd-scapegoat-plugin=true 'set name := "scapegoat-test"; set scapegoatVersion in ThisBuild := "99.0-SNAPSHOT"; scapegoat'