Skip to content

Commit

Permalink
added python test pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
gebauerm committed Oct 20, 2024
1 parent 94af80f commit 45949ae
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 23 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,26 @@ permissions:
contents: read

jobs:
build:

test-package:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: ["3.7", "3.9", "3.10"]
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: "3.10"
python-version: ${{ matrix.python-version }}
- name: Install package
run: |
python -m pip install --upgrade pip
pip install .["test"]
- name: Test with pytest
run: |
pytest
pytest --junitxml=./test_report-${{ matrix.python-version }}.xml --cov-report=xml
- name: Upload test artifacts
uses: actions/upload-artifact@v4
with:
name: test_report-${{ matrix.python-version }}.xml
path: test/junit/test_report-${{ matrix.python-version }}.xml
2 changes: 1 addition & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[pytest]
minversion=6.0
addopts= -ra -v --junitxml=./test_report.xml
addopts= -ra -v --junitxml=test/junit/test_report.xml
testpaths=test
log_format = %(asctime)s %(levelname)s %(message)s
20 changes: 20 additions & 0 deletions rapidflow/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from pathlib import Path
import os

URL = "https://github.com/gebauerm/rapidFlow"
__version__ = "0.1.7"

install_requires = [
"optuna>=2.9.1",
"click>=8.0.1", "scikit-learn", "scipy", "networkx>=2.5.1", "psycopg2-binary", "docker>=5.0.3",
"pandas", "tqdm>=4.62.3"],

test_require = ["pytest==7.1.2", "pytest-cov==3.0.0"]

long_description = ""

this_directory = Path(__file__).parent.parent
if os.path.exists(this_directory/"README.md"):
long_description = (this_directory / "README.md").read_text()
else:
long_description = ""
22 changes: 6 additions & 16 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,29 +1,19 @@
from setuptools import find_packages, setup


URL = "https://github.com/gebauerm/rapidFlow"
__version__ = "0.1.7"

install_requires = [
"optuna>=2.9.1",
"click>=8.0.1", "scikit-learn", "scipy", "networkx>=2.5.1", "psycopg2-binary", "docker>=5.0.3",
"pandas", "tqdm>=4.62.3"],

test_require = ["pytest>=6.2.5"]
import rapidflow as package


setup(
name='rapidflow',
version=__version__,
description='rapidFlow - A framework to perform micro experimentation fast with easy scaling.',
version=package.__version__,
description=package.long_description,
license='MIT',
author='Michael Gebauer',
author_email='[email protected]',
url='https://github.com/gebauerm/rapidFlow',
download_url=f'{URL}/archive/{__version__}.tar.gz',
download_url=f'{package.URL}/archive/{package.__version__}.tar.gz',
packages=find_packages(),
install_requires=install_requires,
extras_require={"test": test_require},
install_requires=package.install_requires,
extras_require={"test": package.test_require},
dependency_links=[""],
python_requires=">=3.7",
include_package_data=True,
Expand Down
2 changes: 2 additions & 0 deletions test/junit/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore

0 comments on commit 45949ae

Please sign in to comment.