This is an automated email from the ASF dual-hosted git repository.
blue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iceberg.git
The following commit(s) were added to refs/heads/master by this push:
new 67a1c4e Build: Add Python tox action (#1733)
67a1c4e is described below
commit 67a1c4ecc55c746f371ff7ca2fd5c861f6727f20
Author: Ryan Blue <[email protected]>
AuthorDate: Fri Nov 6 09:55:35 2020 -0800
Build: Add Python tox action (#1733)
---
.github/workflows/python-ci.yml | 57 +++++++++++++++++++++++++++++
.travis.yml | 80 -----------------------------------------
python/tox.ini | 4 +--
3 files changed, 59 insertions(+), 82 deletions(-)
diff --git a/.github/workflows/python-ci.yml b/.github/workflows/python-ci.yml
new file mode 100644
index 0000000..0c55c7b
--- /dev/null
+++ b/.github/workflows/python-ci.yml
@@ -0,0 +1,57 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+name: "Python CI"
+on: [push, pull_request]
+
+# change detection is based on two references:
+# https://github.community/t/run-job-only-if-folder-changed/118292/2
+# https://carlosbecker.com/posts/git-changed/
+
+jobs:
+ detect_changes:
+ runs-on: ubuntu-latest
+ outputs:
+ python_changed: ${{ steps.check.outputs.python_changed }}
+ steps:
+ - uses: actions/checkout@v2
+ - run: git fetch origin ${{ github.base_ref }}
+ - id: check
+ run: git diff HEAD origin/${{ github.base_ref }} --quiet -- python ||
echo "::set-output name=python_changed::true"
+
+ tox:
+ runs-on: ubuntu-latest
+ needs: detect_changes
+ if: needs.detect_changes.outputs.python_changed == 'true'
+ strategy:
+ matrix:
+ python: [3.6, 3.7, 3.8]
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-python@v2
+ with:
+ python-version: ${{ matrix.python }}
+ - working-directory: ./python
+ run: |
+ pip install -e .[dev]
+ pip install -U tox-gh-actions
+ - working-directory: ./python
+ run: tox
+
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index f5bf8d7..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,80 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-sudo: false
-dist: bionic
-
-matrix:
- include:
- - language: java
- jdk: openjdk11
- name: java11
- before_cache:
- - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- - rm -fr $HOME/.gradle/caches/*/plugin-resolution/
- cache:
- directories:
- - $HOME/.gradle/caches/
- - $HOME/.gradle/wrapper/
-
- - language: java
- jdk: openjdk8
- name: java8
- before_cache:
- - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- - rm -fr $HOME/.gradle/caches/*/plugin-resolution/
- cache:
- directories:
- - $HOME/.gradle/caches/
- - $HOME/.gradle/wrapper/
- - language: python
- python:
- - 3.6
- before_script:
- - cd python
- - pip install -e .[dev]
- - pip install -U tox-travis
- script: tox
- - language: python
- python:
- - 3.7
- before_script:
- - cd python
- - pip install -e .[dev]
- - pip install -U tox-travis
- script: tox
- - language: python
- python:
- - 3.8
- before_script:
- - cd python
- - pip install -e .[dev]
- - pip install -U tox-travis
- script: tox
- deploy:
- provider: pypi
- user: TBD
- password:
- secure: TBD
- distributions: "sdist bdist_wheel"
- skip_existing: true
- on:
- tags: true
-git:
- depth: false
diff --git a/python/tox.ini b/python/tox.ini
index 29868f7..5f9b3ce 100644
--- a/python/tox.ini
+++ b/python/tox.ini
@@ -106,8 +106,8 @@ application-import-names = flake8
[pytest]
norecursedirs=.*
-[travis]
+[gh-actions]
python =
3.6: py36, linters
3.7: py37
- 3.8: py38
\ No newline at end of file
+ 3.8: py38