-
Notifications
You must be signed in to change notification settings - Fork 145
61 lines (49 loc) · 1.64 KB
/
build_with_scala_and_python_tests.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
name: sparkMeasure CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.9', '3.11' ]
java-version: [ 8, 11 ]
steps:
- uses: actions/checkout@v4
- name: Set up Java ${{ matrix.java-version }}
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: ${{ matrix.java-version }}
- name: Build using sbt for all Scala versions supported
run: sbt +package
- name: Run tests for all Scala versions supported
run: sbt +test
- name: Upload sparkMeasure package for Scala 2.13 (Java 11 and Python 3.11)
if: matrix.java == '11' && matrix.python == '3.11'
uses: actions/upload-artifact@v4
with:
name: sparkMeasure package scala 2.13
path: target/scala-2.13/*.jar
# This upload step is conditional on Java 11 and Python 3.11
- name: Upload sparkMeasure package for Scala 2.12 (Java 8 and Python 3.11)
if: matrix.java == '8' && matrix.python == '3.11'
uses: actions/upload-artifact@v4
with:
name: sparkMeasure package scala 2.12
path: target/scala-2.12/*.jar
# This upload step is also conditional on Java 8 and Python 3.11
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r python/requirements.txt
- name: Run pytest
run: |
pytest python/sparkmeasure