Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to GitHub Actions #1254

Merged
merged 29 commits into from
Feb 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
5aa45d4
Add `master.yml` for GitHub Actions
itholic Feb 3, 2020
a2caf75
rearrange & add badge to README.md
itholic Feb 4, 2020
eebf73d
[Add badge to README.md] & [Resolve Tkinter issue]
itholic Feb 5, 2020
afde834
revert unncessary change
itholic Feb 5, 2020
d7c2183
pytest with xvfb
itholic Feb 5, 2020
f81420e
remove unused env: DISPLAY
itholic Feb 5, 2020
01b9d17
remove unused env: DISPLAY
itholic Feb 5, 2020
dedb4af
Remove unused dependencies & add wheel for python3.5
itholic Feb 5, 2020
30c169f
fix comment for xvfb
itholic Feb 5, 2020
c5fd385
Add cache
itholic Feb 5, 2020
87740aa
[Add] conda for 3.6 & 3.7
itholic Feb 6, 2020
8338311
Build Status -> Travis CI
itholic Feb 6, 2020
aebfd56
Remove apt-get update
itholic Feb 6, 2020
b826e6a
Remove env: QT_QPA_PLATFORM
itholic Feb 6, 2020
a1bc99e
Add env: PYTHON_EXECUTABLE
itholic Feb 6, 2020
f291e15
Change comment for xvfb-run
itholic Feb 6, 2020
38d9798
Update pytest
itholic Feb 6, 2020
0c3e4e5
Update comment for xvfb
itholic Feb 6, 2020
3dd6f7b
update comment about xvfb
itholic Feb 6, 2020
45270fa
fix
itholic Feb 7, 2020
31c5088
fix & cleanup pakcages for python3.5
itholic Feb 7, 2020
d049ace
move comment & remove logger for some place
itholic Feb 7, 2020
d228afa
remove unused line
itholic Feb 7, 2020
20a7538
remove comment for xvfb
itholic Feb 7, 2020
8a95dce
[TEST] remove pip install pyspark
itholic Feb 7, 2020
c162736
Fixing & Applying the matrix
itholic Feb 8, 2020
eb14acd
Set env using matrix
itholic Feb 8, 2020
48abbf3
Fix typo
itholic Feb 8, 2020
7808a84
Add comment for QT_QPA_PLATFORM
itholic Feb 8, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 119 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: master

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
itholic marked this conversation as resolved.
Show resolved Hide resolved
python35:
runs-on: ubuntu-latest
env:
SPARK_VERSION: 2.3.4
PANDAS_VERSION: 0.23.4
PYARROW_VERSION: 0.10.0
PYTHON_EXECUTABLE: xvfb-run python
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Using cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-
# Setup Python3.5 via `apt-get install` since the dafault Python3.5 from `actions/setup-python`
# seems to have some problem with Tkinter, so we should manually install the python3.5-tk.
# for this, we should use the Python manually installed, not the default one from `actions/setup-python`
- name: Setup Python 3.5
run: |
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get install tk-dev python3.5-tk python3.5
sudo rm /usr/bin/python
sudo ln -s /usr/bin/python3.5 /usr/bin/python
# Below command is required for ensuring pip installed executables to be in the path.
echo "::add-path::/home/runner/.local/bin"
- name: Install dependencies & run tests
run: |
./dev/download_travis_dependencies.sh
sudo apt-get install xclip
pip install setuptools
pip install -r requirements-dev.txt
pip install pandas==$PANDAS_VERSION pyarrow==$PYARROW_VERSION
pip list
export SPARK_HOME="$HOME/.cache/spark-versions/spark-$SPARK_VERSION-bin-hadoop2.7"
itholic marked this conversation as resolved.
Show resolved Hide resolved
./dev/lint-python
./dev/pytest
# Push the results back to codecov
- name: Update Codecov
run: bash <(curl -s https://codecov.io/bash)

python:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7]
include:
- python-version: 3.6
spark-version: 2.4.4
pandas-version: 0.24.2
pyarrow-version: 0.13.0
logger: databricks.koalas.usage_logging.usage_logger
- python-version: 3.7
spark-version: 2.4.4
pandas-version: 0.25.3
pyarrow-version: 0.14.1
env:
PYTHON_VERSION: ${{ matrix.python-version }}
SPARK_VERSION: ${{ matrix.spark-version }}
PANDAS_VERSION: ${{ matrix.pandas-version }}
PYARROW_VERSION: ${{ matrix.pyarrow-version }}
DISPLAY: 0.0
# `QT_QPA_PLATFORM` for resolving 'QXcbConnection: Could not connect to display :0.0'
QT_QPA_PLATFORM: offscreen
KOALAS_USAGE_LOGGER: ${{ matrix.logger }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Using cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies & run tests
run: |
./dev/download_travis_dependencies.sh
curl -s https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh > miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda
. $HOME/miniconda/etc/profile.d/conda.sh
hash -r
conda config --set always_yes yes --set changeps1 no
conda update -q conda
# Useful for debugging any issues with conda
conda info -a
# Replace dep1 dep2 ... with your dependencies
conda create -c conda-forge -q -n test-environment python=$PYTHON_VERSION
conda activate test-environment
conda install -c conda-forge --yes codecov
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
conda install -c conda-forge --yes --freeze-installed --file requirements-dev.txt
conda list
export SPARK_HOME="$HOME/.cache/spark-versions/spark-$SPARK_VERSION-bin-hadoop2.7"
./dev/lint-python
./dev/pytest
# Push the results back to codecov
- name: Update Codecov
run: bash <(curl -s https://codecov.io/bash)
itholic marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ This project is currently in beta and is rapidly evolving, with a bi-weekly rele

Try the Koalas 10 minutes tutorial on a live Jupyter notebook [here](https://mybinder.org/v2/gh/databricks/koalas/master?filepath=docs%2Fsource%2Fgetting_started%2F10min.ipynb). The initial launch can take up to several minutes.

[![Build Status](https://travis-ci.com/databricks/koalas.svg?token=Rzzgd1itxsPZRuhKGnhD&branch=master)](https://travis-ci.com/databricks/koalas)
[![Github Actions](https://github.com/databricks/koalas/workflows/master/badge.svg)](https://github.com/databricks/koalas/actions)
[![Travis CI](https://travis-ci.com/databricks/koalas.svg?token=Rzzgd1itxsPZRuhKGnhD&branch=master)](https://travis-ci.com/databricks/koalas)
[![codecov](https://codecov.io/gh/databricks/koalas/branch/master/graph/badge.svg)](https://codecov.io/gh/databricks/koalas)
[![Documentation Status](https://readthedocs.org/projects/koalas/badge/?version=latest)](https://koalas.readthedocs.io/en/latest/?badge=latest)
[![Latest Release](https://img.shields.io/pypi/v/koalas.svg)](https://pypi.org/project/koalas/)
Expand Down
10 changes: 6 additions & 4 deletions dev/pytest
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
PYTHON_EXECUTABLE="${PYTHON_EXECUTABLE:-python}"

set -o pipefail
set -e

Expand Down Expand Up @@ -42,13 +44,13 @@ if [ "$#" = 0 ]; then
if [[ "$SPARK_VERSION" == 2.3* ]] || [[ "$SPARK_VERSION" == 2.4.1* ]] || [[ "$SPARK_VERSION" == 2.4.2* ]]; then
# Delta requires Spark 2.4.2+. We skip the related doctests.
if [[ "$SPARK_VERSION" == 2.3* ]]; then
pytest --cov=databricks -k " -melt -to_delta -read_delta" --verbose --showlocals --doctest-modules databricks "${logopts[@]}"
$PYTHON_EXECUTABLE -m pytest --cov=databricks -k " -melt -to_delta -read_delta" --verbose --showlocals --doctest-modules databricks "${logopts[@]}"
else
pytest --cov=databricks -k "-to_delta -read_delta" --verbose --showlocals --doctest-modules databricks "${logopts[@]}"
$PYTHON_EXECUTABLE -m pytest --cov=databricks -k "-to_delta -read_delta" --verbose --showlocals --doctest-modules databricks "${logopts[@]}"
fi
else
pytest --cov=databricks --verbose --showlocals --doctest-modules databricks "${logopts[@]}"
$PYTHON_EXECUTABLE -m pytest --cov=databricks --verbose --showlocals --doctest-modules databricks "${logopts[@]}"
fi
else
pytest "$@"
$PYTHON_EXECUTABLE -m pytest "$@"
fi