-
Notifications
You must be signed in to change notification settings - Fork 99
81 lines (68 loc) · 1.97 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Unit tests
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- pyspark-version: 3.3.4
pip-packages: "pyspark==3.3.4"
- pyspark-version: 3.4.3
pip-packages: "pyspark==3.4.3"
- pyspark-version: 3.5.1
pip-packages: "pyspark==3.5.1"
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17' # Spark 4.0 will drop Java 11;
- name: Set up Python ${{ steps.python_version.outputs.value }}
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: '1.6.1'
- name: Cache Poetry virtualenv
uses: actions/cache@v1
id: cache
with:
path: ~/.virtualenvs
key: poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
poetry-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: make install_test
if: steps.cache.outputs.cache-hit != 'true'
- name: Change PySpark to version ${{ matrix.pyspark-version }}
env:
PIP_PACKAGES: ${{ matrix.pip-packages }}
run: poetry run pip install $PIP_PACKAGES # Using pip shouldn't mess up poetry cache
- name: Run tests with pytest against PySpark ${{ matrix.pyspark-version }}
run: make test
check-license-headers:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Check License Header
uses: apache/skywalking-eyes/dependency@main
with:
log: debug
config: .licenserc.yaml
mode: check