Commit b7ebe7a3 authored by Yuxin Wu's avatar Yuxin Wu

add publish action

parent 79b5480d
name: Linter
on: [push, pull_request]
name: Publish to PyPI
on:
push:
tags:
- 'v*'
jobs:
lint:
deploy:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [2.7, 3.5, 3.6, 3.7]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
flake8 --version
- name: Lint
run: |
flake8 .
- name: Lint Examples
# some examples are py3 only
if: matrix.python-version != 2.7
run: |
cd examples
flake8 .
pip install twine
- name: Build
run: python setup.py sdist bdist_wheel
- name: Publish
env:
TWINE_USERNAME: ppwwyyxx
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: twine upload dist/*
name: Unit Tests
name: CI
on: [push, pull_request]
jobs:
unittest:
linter:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [2.7, 3.6, 3.7]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
flake8 --version
- name: Lint
run: |
flake8 .
- name: Lint Examples
# some examples are py3 only
if: matrix.python-version != 2.7
run: |
cd examples
flake8 .
unittest:
runs-on: ubuntu-latest
strategy:
max-parallel: 6
matrix:
python-version: [2.7, 3.6]
TF-version: [1.3.0, 1.14.0, nightly]
......@@ -32,7 +60,5 @@ jobs:
./tests/install-tensorflow.sh
python -c "import tensorflow as tf; print(tf.VERSION, tf.GIT_VERSION)"
- name: Test
- name: Run Tests
run: ./tests/run-tests.sh
......@@ -17,7 +17,8 @@ python -c "import tensorflow as tf; tf.Operation._add_control_input"
python -m tensorpack.callbacks.param_test
python -m tensorpack.tfutils.unit_tests
python -m unittest tensorpack.dataflow.imgaug._test
TENSORPACK_SERIALIZE=pyarrow python test_serializer.py
# use pyarrow after we organize the serializers.
# TENSORPACK_SERIALIZE=pyarrow python test_serializer.py
TENSORPACK_SERIALIZE=msgpack python test_serializer.py
python -m unittest discover -v
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment