Skip to content

Commit

Permalink
(testing) added model download retrying for full testing workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
amkrajewski committed Feb 13, 2024
1 parent b9295a9 commit 78455db
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .github/workflows/fullTest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@ jobs:
python -m pip install -e ".[dev]"
- name: Download Models
id: DownloadModelsAttempt1
run: python -c "import pysipfenn; c = pysipfenn.Calculator(); c.downloadModels(); c.loadModels();"
continue-on-error: true

- name: Download Models Retry if failed the first time
if: failure()
run: python -c "import time; time.sleep(120); import pysipfenn; c = pysipfenn.Calculator(autoLoad=False); c.downloadModels(); c.loadModels();"

- name: Test with pytest
run: pytest --durations=0 --cov=pysipfenn --cov-report=xml
Expand Down Expand Up @@ -61,8 +67,15 @@ jobs:
python -m pip install --upgrade setuptools
python -m pip install wheel flask pytest
python -m pip install -e ".[dev]"
- name: Download Models
id: DownloadModelsAttempt1
run: python -c "import pysipfenn; c = pysipfenn.Calculator(); c.downloadModels(); c.loadModels();"
continue-on-error: true

- name: Download Models Retry if failed the first time
if: failure()
run: python -c "import time; time.sleep(120); import pysipfenn; c = pysipfenn.Calculator(autoLoad=False); c.downloadModels(); c.loadModels();"

- name: Test with pytest
run: pytest --durations=0
Expand All @@ -88,8 +101,15 @@ jobs:
python -m pip install --upgrade setuptools
python -m pip install wheel flask pytest
python -m pip install -e ".[dev]"
- name: Download Models
id: DownloadModelsAttempt1
run: python -c "import pysipfenn; c = pysipfenn.Calculator(); c.downloadModels(); c.loadModels();"
continue-on-error: true

- name: Download Models Retry if failed the first time
if: failure()
run: python -c "import time; time.sleep(120); import pysipfenn; c = pysipfenn.Calculator(autoLoad=False); c.downloadModels(); c.loadModels();"

- name: Test with pytest
run: pytest --durations=0
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/weeklyTesting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,16 @@ jobs:
python -m pip install --upgrade setuptools
python -m pip install wheel flask pytest
python -m pip install -e ".[dev]"
- name: Download Models
id: DownloadModelsAttempt1
run: python -c "import pysipfenn; c = pysipfenn.Calculator(); c.downloadModels(); c.loadModels();"

continue-on-error: true

- name: Download Models Retry if failed the first time
if: failure()
run: python -c "import time; time.sleep(120); import pysipfenn; c = pysipfenn.Calculator(autoLoad=False); c.downloadModels(); c.loadModels();"

- name: Test with pytest
run: pytest --durations=0
env:
Expand Down

0 comments on commit 78455db

Please sign in to comment.