-
Notifications
You must be signed in to change notification settings - Fork 171
88 lines (87 loc) · 3.19 KB
/
build-and-test.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
82
83
84
85
86
87
88
name: Build and Test
on: [push, pull_request]
jobs:
build-and-test:
runs-on: ubuntu-20.04
env:
SPARK_LOCAL_IP: localhost
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AZURE_TEST_ACCOUNT_KEY: ${{ secrets.AZURE_TEST_ACCOUNT_KEY }}
GOOGLE_APPLICATION_CREDENTIALS: /tmp/google_service_account_key.json
GOOGLE_SERVICE_ACCOUNT_KEY: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_KEY }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Cache Scala, SBT
uses: actions/cache@v2
with:
path: |
~/.sbt
~/.ivy2
~/.cache/coursier
key: build-and-test-scala
- name: Install Java 8
uses: actions/setup-java@v1
with:
java-version: '8'
- run: ./build/sbt test
python:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9]
include:
- pandas-version: 1.2.4
pyarrow-version: 4.0.0
env:
PYTHON_VERSION: ${{ matrix.python-version }}
PANDAS_VERSION: ${{ matrix.pandas-version }}
PYARROW_VERSION: ${{ matrix.pyarrow-version }}
SPARK_LOCAL_IP: localhost
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AZURE_TEST_ACCOUNT_KEY: ${{ secrets.AZURE_TEST_ACCOUNT_KEY }}
GOOGLE_APPLICATION_CREDENTIALS: /tmp/google_service_account_key.json
GOOGLE_SERVICE_ACCOUNT_KEY: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_KEY }}
# Github Actions' default miniconda
CONDA_PREFIX: /usr/share/miniconda
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Cache Scala, SBT
uses: actions/cache@v2
with:
path: |
~/.sbt
~/.ivy2
~/.cache/coursier
key: build-and-test-python
- name: Install Java 8
uses: actions/setup-java@v1
with:
java-version: '8'
- name: Install dependencies
run: |
# See also https://github.com/conda/conda/issues/7980
source "$CONDA_PREFIX/etc/profile.d/conda.sh"
conda update -q conda
conda create -c conda-forge -q -n test-environment python=$PYTHON_VERSION
conda activate test-environment
conda config --env --add pinned_packages python=$PYTHON_VERSION
conda config --env --add pinned_packages pandas==$PANDAS_VERSION
conda config --env --add pinned_packages pyarrow==$PYARROW_VERSION
conda install -c conda-forge --yes pandas==$PANDAS_VERSION pyarrow==$PYARROW_VERSION
sed -i -e "/pandas/d" -e "/pyarrow/d" python/requirements-dev.txt
conda install -c conda-forge --yes --file python/requirements-dev.txt
conda list
- name: Build Server
run: ./build/sbt package
- name: Run tests
run: |
# See also https://github.com/conda/conda/issues/7980
source "$CONDA_PREFIX/etc/profile.d/conda.sh"
conda activate test-environment
./python/dev/lint-python
./python/dev/pytest