diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b83f7c8..3ade4dd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-22.04] + os: [ubuntu-22.04,windows-latest] python-version: [3.9] steps: - name: Checkout repository @@ -29,10 +29,16 @@ jobs: python -m pip install -e . python -m spacy download en_core_web_md python -m textblob.download_corpora - - name: Run pytest + - name: Run pytest linux (linux-only) + if: matrix.os == 'ubuntu-22.04' run: | cd ammico python -m pytest -m "not gcv and not long" -svv --cov=. --cov-report=xml + - name: Run pytest windows(windows-only) + if: matrix.os == 'windows-latest' + run: | + cd ammico + python -m pytest -m "not gcv and not long and not win_skip" -svv --cov=. --cov-report=xml - name: Upload coverage if: matrix.os == 'ubuntu-22.04' && matrix.python-version == '3.9' uses: codecov/codecov-action@v3 diff --git a/ammico/test/pytest.ini b/ammico/test/pytest.ini index fc5b670..fed71b8 100644 --- a/ammico/test/pytest.ini +++ b/ammico/test/pytest.ini @@ -1,4 +1,5 @@ [pytest] markers = gcv: mark google cloud vision tests - skip to save money. - long: mark long running tests - skip to save compute resources. \ No newline at end of file + long: mark long running tests - skip to save compute resources. + win_skip: mark tests that are skipped on windows. \ No newline at end of file diff --git a/ammico/test/test_summary.py b/ammico/test/test_summary.py index 1cb1fd7..909c977 100644 --- a/ammico/test/test_summary.py +++ b/ammico/test/test_summary.py @@ -77,6 +77,7 @@ def test_analyse_image(get_dict): summary_vis_processors = None +@pytest.mark.win_skip def test_analyse_questions(get_dict): list_of_questions = [ "How many persons on the picture?", diff --git a/ammico/test/test_text.py b/ammico/test/test_text.py index 9a14955..3fd21ff 100644 --- a/ammico/test/test_text.py +++ b/ammico/test/test_text.py @@ -116,6 +116,7 @@ def test_sentiment_analysis(): assert test_obj.subdict["subjectivity"] == 0.6 +@pytest.mark.win_skip def test_text_summary(get_path): mydict = {} test_obj = tt.TextDetector(mydict, analyse_text=True) @@ -137,6 +138,7 @@ def test_text_sentiment_transformers(): assert mydict["sentiment_score"] == pytest.approx(0.99, 0.01) +@pytest.mark.win_skip def test_text_ner(): mydict = {} test_obj = tt.TextDetector(mydict, analyse_text=True) @@ -146,6 +148,7 @@ def test_text_ner(): assert mydict["entity_type"] == ["PER", "LOC"] +@pytest.mark.win_skip def test_PostprocessText(set_testdict, get_path): reference_dict = "THE\nALGEBRAIC\nEIGENVALUE\nPROBLEM\nDOM\nNVS TIO\nMINA\nMonographs\non Numerical Analysis\nJ.. H. WILKINSON" reference_df = "Mathematische Formelsammlung\nfür Ingenieure und Naturwissenschaftler\nMit zahlreichen Abbildungen und Rechenbeispielen\nund einer ausführlichen Integraltafel\n3., verbesserte Auflage"