Skip to content

Commit d289ae3

Browse files
authored
split tests & skip win py 3.11 (#155)
* split streaming and non-streaming tasks, skip win python 3.11 tests in streaming mode * fix condition and python in detail version * ls the current folder content * add .coverage file name in env var * fix job execution * remove `ls -a` * `CHANGELOG.md` updated
1 parent 8604c64 commit d289ae3

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

.github/workflows/test.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ on:
1717
env:
1818
TEST_PYTHON_VERSION: 3.9
1919
TEST_OS: 'ubuntu-20.04'
20+
SKIP_STREAMING_OS: 'windows-2022'
21+
SKIP_STREAMING_PYTHON_VERSION: 3.11.0
2022

2123
jobs:
2224
build:
@@ -40,12 +42,25 @@ jobs:
4042
run: |
4143
python otherfiles/requirements-splitter.py
4244
pip install --upgrade --upgrade-strategy=only-if-needed -r test-requirements.txt
43-
- name: Pymilo Functionality Tests with pytest
45+
- name: Pymilo Core Functionality Tests with pytest
46+
env:
47+
COVERAGE_FILE: .coverage.core
4448
run: |
45-
python -m pytest . --cov=pymilo --cov-report=term
49+
python -m pytest . --ignore=./tests/test_ml_streaming --cov=pymilo --cov-report=term --cov-report=xml:coverage_core.xml
50+
- name: Pymilo Streaming Functionality Tests with pytest
51+
env:
52+
COVERAGE_FILE: .coverage.streaming
53+
run: |
54+
python -m pytest ./tests/test_ml_streaming --cov=pymilo --cov-report=term --cov-report=xml:coverage_streaming.xml
55+
if: matrix.python-version != env.SKIP_STREAMING_PYTHON_VERSION || matrix.os != env.SKIP_STREAMING_OS
56+
- name: Merge coverage files
57+
run: |
58+
coverage combine
59+
coverage xml -o coverage_combined.xml
4660
- name: Upload coverage to Codecov
4761
uses: codecov/codecov-action@v3
4862
with:
63+
files: coverage_combined.xml
4964
fail_ci_if_error: false
5065
if: matrix.python-version == env.TEST_PYTHON_VERSION && matrix.os == env.TEST_OS
5166
- name: Vulture, Bandit and Pydocstyle Tests

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
2424
- PyMilo exception types added in `pymilo/exceptions/__init__.py`
2525
- PyMilo exception types added in `pymilo/__init__.py`
2626
### Changed
27+
- `core` and `streaming` tests divided in `test.yml`
2728
- `communication_protocol` parameter added to `PyMiloClient` class
2829
- `communication_protocol` parameter added to `PyMiloServer` class
2930
- `ML Streaming` testcases updated to support protocol selection

0 commit comments

Comments
 (0)