-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #70 from sbesson/ghactions
Switch from Travis CI to GitHub workflows
- Loading branch information
Showing
6 changed files
with
107 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: PyPI | ||
on: push | ||
|
||
jobs: | ||
build-n-publish: | ||
name: Build and publish Python distribution to PyPI | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
- name: Build a binary wheel and a source tarball | ||
run: | | ||
python -mpip install wheel | ||
python setup.py sdist bdist_wheel | ||
- name: Publish distribution to PyPI | ||
if: startsWith(github.ref, 'refs/tags') | ||
uses: pypa/gh-action-pypi-publish@v1.3.0 | ||
with: | ||
password: ${{ secrets.PYPI_PASSWORD }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
name: Tox | ||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
name: Run tox tests | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: | ||
- '3.6' | ||
- '3.7' | ||
- '3.8' | ||
- '3.9' | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: python -mpip install --upgrade wheel pytest tox | ||
- name: Get tox target | ||
id: toxtarget | ||
run: | | ||
py=$(echo ${{ matrix.python-version }} | tr -d .) | ||
echo "::set-output name=py::$py" | ||
- name: Run tests | ||
run: tox -e py${{ steps.toxtarget.outputs.py }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
[tox] | ||
envlist = py36, py37, py38, py39 | ||
# https://tox.readthedocs.io/en/latest/config.html#conf-requires | ||
# Ensure pip is new enough | ||
requires = pip >= 19.0.0 | ||
virtualenv >= 16.0.0 | ||
|
||
[testenv] | ||
# For environment markers see | ||
# https://www.python.org/dev/peps/pep-0508/#environment-markers | ||
deps = | ||
flake8 | ||
omero-py | ||
pytest-rerunfailures | ||
pytest-xdist | ||
restructuredtext-lint | ||
https://github.com/ome/zeroc-ice-py-github-ci/releases/download/0.1.0/zeroc_ice-3.6.5-cp36-cp36m-linux_x86_64.whl; platform_system=="Linux" and python_version=="3.6" | ||
https://github.com/ome/zeroc-ice-py-github-ci/releases/download/0.1.0/zeroc_ice-3.6.5-cp37-cp37m-linux_x86_64.whl; platform_system=="Linux" and python_version=="3.7" | ||
https://github.com/ome/zeroc-ice-py-github-ci/releases/download/0.1.0/zeroc_ice-3.6.5-cp38-cp38-linux_x86_64.whl; platform_system=="Linux" and python_version=="3.8" | ||
https://github.com/ome/zeroc-ice-py-github-ci/releases/download/0.1.0/zeroc_ice-3.6.5-cp39-cp39-linux_x86_64.whl; platform_system=="Linux" and python_version=="3.9" | ||
commands = | ||
rst-lint README.rst | ||
flake8 . | ||
python setup.py sdist install --record files.txt | ||
python -c 'import omero.clients; import omero_marshal.encode' | ||
pytest {posargs:-n4 -rf tests -s} | ||
sh -c 'cat files.txt | xargs rm -rf' | ||
python setup.py bdist_egg | ||
sh -c 'easy_install dist/*.egg' | ||
python -c 'import omero.clients; import omero_marshal.encode' |