Skip to content

Commit fe38763

Browse files
committed
feature: tox integration
1 parent 37d1e39 commit fe38763

3 files changed

Lines changed: 22 additions & 9 deletions

File tree

.github/workflows/code-quality.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,10 @@ jobs:
4040
env RUSTFLAGS="-D unused_crate_dependencies" PATH="${PATH}:${HOME}/.poetry/bin" poetry run pre-commit run --hook-stage push --all-files
4141
4242
tests-python:
43-
name: Python ${{ matrix.python-version }} ${{ matrix.os }} tests
43+
name: Run ${{ matrix.os }} tests
4444
strategy:
4545
matrix:
4646
os: [ubuntu-latest]
47-
python-version: ['3.6', '3.7', '3.8']
4847
runs-on: ${{ matrix.os }}
4948
steps:
5049
- uses: actions/checkout@v2
@@ -54,22 +53,20 @@ jobs:
5453
profile: minimal
5554
toolchain: nightly
5655
override: true
56+
5757
- name: Setup python
5858
uses: actions/setup-python@v2
5959
with:
60-
python-version: ${{ matrix.python-version }}
60+
python-version: "3.8.x"
61+
6162
- name: Install poetry
6263
run: |
6364
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
6465
65-
- name: Install dependencies
66+
- name: Install streamson
6667
run: |
6768
env PATH="${PATH}:${HOME}/.poetry/bin" poetry install
6869
69-
- name: Build the project
70-
run: |
71-
env PATH="${PATH}:${HOME}/.poetry/bin" poetry run maturin develop
72-
7370
- name: Run tests
7471
run: |
75-
env PATH="${PATH}:${HOME}/.poetry/bin" poetry run pytest tests/
72+
env PATH="${PATH}:${HOME}/.poetry/bin" poetry run tox

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,4 @@ maturin = "~0.8.0"
4747
safety = "~1.9.0"
4848
urllib3 = ">=1.24.2"
4949
darglint = "~1.5.2"
50+
tox = "~3.20.1"

tox.ini

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[tox]
2+
isolated_build = True
3+
envlist = py{3.6,3.7,3.8}
4+
5+
[tox:.package]
6+
basepython = python3
7+
8+
[testenv]
9+
deps =
10+
.
11+
whitelist_externals = poetry
12+
skip_install = true
13+
commands =
14+
poetry install
15+
poetry run pytest -v tests/

0 commit comments

Comments
 (0)