Skip to content

Commit 93d597f

Browse files
authored
Merge pull request #402 from martindurant/gha
migrate to github actions
2 parents 4df73ca + 8fdf456 commit 93d597f

7 files changed

Lines changed: 131 additions & 24 deletions

File tree

.coveragerc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[run]
2-
source =
3-
streamz
2+
source = streamz
3+
relative_files = True
44
[report]
55
omit =
66
*/python?.?/*

.github/workflows/main.yaml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: "*"
6+
pull_request:
7+
branches: master
8+
9+
jobs:
10+
test:
11+
name: ${{ matrix.CONDA_ENV }}-pytest
12+
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
CONDA_ENV: [py37, py38]
17+
env:
18+
STREAMZ_LAUNCH_KAFKA: true
19+
20+
steps:
21+
- name: APT
22+
run: sudo apt-get install liblzo2-dev libsnappy-dev
23+
24+
- name: Checkout
25+
uses: actions/checkout@v2
26+
27+
- name: Setup Miniconda
28+
uses: conda-incubator/setup-miniconda@v2
29+
with:
30+
auto-update-conda: true
31+
auto-activate-base: false
32+
activate-environment: test_env
33+
environment-file: ci/environment-${{ matrix.CONDA_ENV }}.yml
34+
35+
36+
- name: pip-install
37+
shell: bash -l {0}
38+
run: |
39+
pip install -e . --no-deps
40+
41+
- name: Run Tests
42+
shell: bash -l {0}
43+
run: |
44+
pytest --verbose --cov=streamz
45+
46+
- name: coveralls
47+
shell: bash -l {0}
48+
if: ${{ matrix.os == 'ubuntu-latest' && matrix.CONDA_ENV == 'py38' }}
49+
run: coveralls
50+
51+
lint:
52+
name: lint
53+
runs-on: ubuntu-latest
54+
steps:
55+
- uses: actions/checkout@v2
56+
- uses: actions/setup-python@v2
57+
- name: pip-install
58+
shell: bash -l {0}
59+
run: |
60+
pip install flake8
61+
- name: Lint
62+
shell: bash -l {0}
63+
run: |
64+
flake8 streamz

.github/workflows/pypipublish.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Upload Python Package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Set up Python
13+
uses: actions/setup-python@v2
14+
with:
15+
python-version: "3.x"
16+
- name: Install dependencies
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install setuptools setuptools-scm wheel twine
20+
- name: Build and publish
21+
env:
22+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
23+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
24+
run: |
25+
python setup.py sdist bdist_wheel
26+
twine upload dist/*

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ LICENSE
1414

1515
BSD-3 Clause
1616

17-
.. |Build Status| image:: https://travis-ci.org/python-streamz/streamz.svg?branch=master
18-
:target: https://travis-ci.org/python-streamz/streamz
17+
.. |Build Status| image:: https://github.com/python-streamz/streamz/workflows/CI/badge.svg
18+
:target: https://github.com/python-streamz/streamz/actions
1919
.. |Doc Status| image:: http://readthedocs.org/projects/streamz/badge/?version=latest
2020
:target: http://streamz.readthedocs.org/en/latest/
2121
:alt: Documentation Status
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
name: streamz_dev
1+
name: test_env
22
channels:
33
- conda-forge
4-
- bokeh
54
- defaults
65
dependencies:
7-
- python>=3.7
6+
- python=3.7
87
- pytest
98
- flake8
109
- black
@@ -31,3 +30,4 @@ dependencies:
3130
- ipykernel
3231
- ipywidgets
3332
- flaky
33+
- pytest-cov

ci/environment-py38.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: test_env
2+
channels:
3+
- conda-forge
4+
- defaults
5+
dependencies:
6+
- python=3.7
7+
- pytest
8+
- flake8
9+
- black
10+
- isort
11+
- tornado
12+
- toolz
13+
- zict
14+
- six
15+
- librdkafka=1.2.2
16+
- dask
17+
- distributed
18+
- pandas
19+
- python-confluent-kafka=1.1.0
20+
- numpydoc
21+
- sphinx
22+
- sphinx_rtd_theme
23+
- codecov
24+
- coverage
25+
- networkx
26+
- graphviz
27+
- python-graphviz
28+
- bokeh
29+
- ipython
30+
- ipykernel
31+
- ipywidgets
32+
- flaky
33+
- pytest-cov
34+
- coveralls

run_tests.py

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)