Skip to content

Commit

Permalink
add pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
BoPeng committed Feb 9, 2024
1 parent 0c2ce0c commit 2f23edb
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 2 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: pytest

on: [push, pull_request]

jobs:
pytest:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.10
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements_dev
- name: Run tests
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
pytest -v --timeout=200
3 changes: 1 addition & 2 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ pytest
pytest-cov
coverage
nose


pytest-timeout
2 changes: 2 additions & 0 deletions test/test_execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
# if the test is imported under sos/test, test interacive executor
from sos.workflow_executor import Base_Executor

pytest.skip(allow_module_level=True)


def multi_attempts(fn):

Expand Down
2 changes: 2 additions & 0 deletions test/test_execute_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
# if the test is imported under sos/test, test interacive executor
from sos.workflow_executor import Base_Executor

pytest.skip(allow_module_level=True)


def test_for_each_nested_list(temp_factory):
"""Test for_each option of input"""
Expand Down
2 changes: 2 additions & 0 deletions test/test_nested.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
from sos.targets import file_target
from sos.utils import env

pytest.skip(allow_module_level=True)


def test_progress_bar():
# progress bar with nested workflow
Expand Down

0 comments on commit 2f23edb

Please sign in to comment.