-
Notifications
You must be signed in to change notification settings - Fork 18
55 lines (47 loc) · 1.45 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
52
53
54
55
name: build-test-coveralls
on:
pull_request:
branches: ['**']
paths-ignore: ['**.md']
push:
branches: ['**']
paths-ignore: ['**.md']
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build:
name: Build and Test
strategy:
matrix:
os: [ubuntu-latest]
scala: ["2_11", "2_12", "2_13", "3_3"]
java: [11, 17, 21]
platform: ["jvm"]
runs-on: ${{ matrix.os }}
env:
VERSION_SPEC: ${{matrix.scala}}-${{matrix.platform}}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Java ${{matrix.java}}
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: ${{matrix.java}}
cache: sbt
- name: Compile and Run Tests
if: matrix.scala != '2_13' || matrix.java != 21
run: sbt test-$VERSION_SPEC
- name: Compile, Run Tests and Generate Code Coverage Reports (2.13 only)
if: matrix.scala == '2_13' && matrix.java == 21
run: sbt clean-$VERSION_SPEC coverage test-$VERSION_SPEC
- name: Aggregate Code Coverage Report (2.13 only)
if: matrix.scala == '2_13' && matrix.java == 21
run: sbt coverageAggregate
- name: Upload Code Coverage Report (2.13 only)
if: matrix.scala == '2_13' && matrix.java == 21
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}