-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (51 loc) · 1.52 KB
/
tests_scala.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
name: scala tests
on:
push:
branches:
- "**"
tags:
- "!**"
workflow_call:
jobs:
Tests:
name: Scala tests with Java ${{ matrix.JAVA_VERSION }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: scala
strategy:
matrix:
suite: [ seshat ]
JAVA_VERSION: [ 11, 17, 21 ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.JAVA_VERSION }}
- name: Cache for Scala Dependencies
uses: actions/cache@v4
with:
path: |
~/.mill/download
~/.m2/repository
~/.cache/coursier
key: ${{ runner.os }}-java-mill-${{ matrix.JAVA_VERSION }}-${{ hashFiles('**/build.sc') }}
restore-keys: ${{ runner.os }}-java-mill-
- name: Compile Scala Code
run: |
./mill --no-server clean
./mill --no-server --disable-ticker ${{ matrix.suite }}.compile
- name: Test Scala Code
run: |
./mill --no-server --disable-ticker ${{ matrix.suite }}.test
- name: Create Code Coverage Report
if: matrix.java-version == '11'
run: |
./mill --no-server --disable-ticker ${{ matrix.suite }}.scoverage.htmlReport
- name: Upload Code Coverage Report
uses: actions/upload-artifact@v4
if: matrix.java-version == '11'
with:
name: code-coverage
path: out/seshat/scoverage/htmlReport.dest/