Skip to content

Commit

Permalink
Update stability tests (#1483)
Browse files Browse the repository at this point in the history
  • Loading branch information
yunchu authored May 3, 2024
1 parent 63d544f commit 900b7dd
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 26 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/weekly_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ['ubuntu-20.04', 'windows-2022']
python-version: ['3.10']
python-version: ['3.9', '3.10', '3.11']
extra: ['default', 'tf', 'tfds', 'torch']
include:
- python-version: "3.9"
tox-env-py: "39"
- python-version: "3.10"
tox-env-py: "310"
- os: "ubuntu-20.04"
tox-env-os: "lin"
- os: "windows-2022"
tox-env-os: "win"
name: stability test (${{ matrix.os }}, Python ${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
- python-version: "3.11"
tox-env-py: "311"
name: stability test (Python ${{ matrix.python-version }}, Extra ${{ matrix.extra }})
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Installing python
Expand All @@ -41,12 +41,12 @@ jobs:
python -m pip install tox
- name: Stability testing
run: |
tox -e stability-${{ matrix.tox-env-os }}
tox -e stability-${{ matrix.extra }}
- name: Upload test results
uses: actions/upload-artifact@v4
with:
name: results-stability-${{ matrix.tox-env-os }}
path: .tox/results-stability-${{ matrix.tox-env-os }}.csv
name: stability-${{ matrix.python-version }}-${{ matrix.extra }}
path: .tox/stability-${{ matrix.extra }}/log
call-notify-to-teams:
needs: [weekly_stability_test]
if: |
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ def parse_requirements(filename=CORE_REQUIREMENTS_FILE):
extras_require={
"tf": ["tensorflow"],
"tfds": ["tensorflow-datasets<4.9.3"],
"tf-gpu": ["tensorflow-gpu"],
"torch": ["torch", "torchvision"],
"default": DEFAULT_REQUIREMENTS,
},
Expand Down
1 change: 1 addition & 0 deletions tests/fuzzing/assets/cli_operations.dict
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
"stats"
"transform"
"validate"
"project"
29 changes: 15 additions & 14 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -76,29 +76,30 @@ commands =
commands =
python -m pytest -v --csv={toxworkdir}/results_val_{envname}.csv -m {posargs:new}


[testenv:stability-{lin,win}]
deps =
[testenv:fuzzing]
deps=
{[testenv]deps}
pytest-loop
atheris
allowlist_externals =
bash
commands_pre =
bash -c 'cargo -V; echo "cargo (rust) version checking exit code = $?"'
python -m pip uninstall pytest-stress -y
commands =
python -m pytest -v --csv={toxworkdir}/results-{envname}.csv -x {posargs:--loop 5}

; coverage erase
python tests/fuzzing/cli_fuzzing.py {posargs:-dict=tests/fuzzing/assets/cli_operations.dict -artifact_prefix={toxworkdir}/ -print_final_stats=1 -atheris_runs=500000}
; coverage report --precision=2

[testenv:fuzzing]
deps=
{[testenv]deps}
atheris
[testenv:stability-{default,tf,tfds,torch}]
deps =
{[testenv:fuzzing]deps}
extras =
default: default
tf: tf
tfds: tfds
torch: torch
allowlist_externals =
bash
commands_pre =
bash -c 'cargo -V; echo "cargo (rust) version checking exit code = $?"'
commands =
coverage erase
- coverage run tests/fuzzing/cli_fuzzing.py {posargs:-dict=tests/fuzzing/assets/cli_operations.dict -artifact_prefix={toxworkdir}/ -print_final_stats=1 -atheris_runs=500000}
coverage report --precision=2
python tests/fuzzing/cli_fuzzing.py {posargs:-dict=tests/fuzzing/assets/cli_operations.dict -artifact_prefix={toxworkdir}/ -print_final_stats=1 -atheris_runs=5000}

0 comments on commit 900b7dd

Please sign in to comment.