Skip to content

Commit

Permalink
Merge pull request #23 from zendesk/jshen/EP-ga-migration
Browse files Browse the repository at this point in the history
Add GitHub Actions workflows to migrate away from Travis-CI
  • Loading branch information
everops-john authored Jul 1, 2020
2 parents c355edd + 3f22519 commit 8079e14
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 40 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: repo-checks
on:
pull_request:
branches:
- master
jobs:
main:
name: python3-matrix
runs-on: ubuntu-latest
strategy:
matrix:
task: ['Tests Python 3.6', 'Tests Python 3.7', 'Tests Python 3.8', 'Linting Python 3.7', 'Type Checking Python 3.7']
include:
- task: 'Tests Python 3.6'
python: 3.6
run: pytest -v tests
- task: 'Tests Python 3.7'
python: 3.7
run: pytest -v tests
- task: 'Tests Python 3.8'
python: 3.8
run: pytest -v tests
- task: 'Linting Python 3.7'
python: 3.7
run: flake8 tensor_serving_client/min_tfs_client tests/
- task: 'Type Checking Python 3.7'
python: 3.7
run: mypy tensor_serving_client/min_tfs_client --ignore-missing-imports
steps:
- uses: zendesk/checkout@v2
- uses: zendesk/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: install dependencies
run: |
./scripts/travis/tensor_serving_install.sh
./scripts/travis/protoc_install.sh
- name: add bin to path
run: |
echo "::add-path::$HOME/bin"
- name: install python dependencies
run: |
unset PYTHONDONTWRITEBYTECODE
pip install -e .[dev]
pip install wheel
python setup.py bdist_wheel
pip install --no-index --find-links=dist/ min_tfs_client
tensorflow_model_server --port=4080 --model_base_path=$PWD/tests/integration/fixtures && sleep 1 &
- name: ${{ matrix.task }}
run: |
${{ matrix.run }}
36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
![repo-checks](https://github.com/zendesk/min-tfs-client/workflows/repo-checks/badge.svg)
# Minimal Tensor Serving Python Client
A lightweight python client to communicate with Tensor Serving.

Expand Down
8 changes: 5 additions & 3 deletions scripts/travis/protoc_install.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/bin/bash
set -ex

PROTOBUF_VERSION=3.3.0
PROTOC_FILENAME=protoc-${PROTOBUF_VERSION}-linux-x86_64.zip
pushd /home/travis
pushd ${HOME}
wget https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/${PROTOC_FILENAME}
unzip ${PROTOC_FILENAME}
unzip -o ${PROTOC_FILENAME} bin/protoc
unzip -o ${PROTOC_FILENAME} 'include/*'
bin/protoc --version
popd
popd
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,5 @@ def run(self):
packages=find_namespace_packages(where="tensor_serving_client"),
install_requires=["grpcio>=1.21", "protobuf>=3.8", "numpy>=1.16.4"],
tests_require=["pytest"],
extras_require={"dev": ["black==19.10b0", "flake8", "mypy"]},
extras_require={"dev": ["black==19.10b0", "flake8", "mypy", "pytest"]},
)

0 comments on commit 8079e14

Please sign in to comment.