[DEV] pytest retry for flakey tests (#718)
This commit is contained in:
parent
a48efdc84c
commit
6c3e70a9fd
3 changed files with 11 additions and 10 deletions
10
.github/workflows/ci-windows.yaml
vendored
10
.github/workflows/ci-windows.yaml
vendored
|
|
@ -29,7 +29,7 @@ jobs:
|
|||
move "ffmpeg-master-latest-win64-gpl\bin\ffprobe.exe" "ffprobe.exe"
|
||||
|
||||
python -m pip install -e .[test]
|
||||
python -m pytest tests/unit
|
||||
python -m pytest --reruns 3 --reruns-delay 5 tests/unit
|
||||
|
||||
test-soundcloud:
|
||||
runs-on: windows-latest
|
||||
|
|
@ -52,7 +52,7 @@ jobs:
|
|||
move "ffmpeg-master-latest-win64-gpl\bin\ffprobe.exe" "ffprobe.exe"
|
||||
|
||||
python -m pip install -e .[test]
|
||||
python -m pytest tests/e2e/soundcloud
|
||||
python -m pytest --reruns 3 --reruns-delay 5 tests/e2e/soundcloud
|
||||
|
||||
test-bandcamp:
|
||||
runs-on: windows-latest
|
||||
|
|
@ -75,7 +75,7 @@ jobs:
|
|||
move "ffmpeg-master-latest-win64-gpl\bin\ffprobe.exe" "ffprobe.exe"
|
||||
|
||||
python -m pip install -e .[test]
|
||||
python -m pytest tests/e2e/bandcamp
|
||||
python -m pytest --reruns 3 --reruns-delay 5 tests/e2e/bandcamp
|
||||
|
||||
|
||||
test-youtube:
|
||||
|
|
@ -99,7 +99,7 @@ jobs:
|
|||
move "ffmpeg-master-latest-win64-gpl\bin\ffprobe.exe" "ffprobe.exe"
|
||||
|
||||
python -m pip install -e .[test]
|
||||
python -m pytest tests/e2e/youtube
|
||||
python -m pytest --reruns 3 --reruns-delay 5 tests/e2e/youtube
|
||||
|
||||
test-plugins:
|
||||
runs-on: windows-latest
|
||||
|
|
@ -122,4 +122,4 @@ jobs:
|
|||
move "ffmpeg-master-latest-win64-gpl\bin\ffprobe.exe" "ffprobe.exe"
|
||||
|
||||
python -m pip install -e .[test]
|
||||
python -m pytest tests/e2e/plugins
|
||||
python -m pytest --reruns 3 --reruns-delay 5 tests/e2e/plugins
|
||||
|
|
|
|||
10
.github/workflows/ci.yaml
vendored
10
.github/workflows/ci.yaml
vendored
|
|
@ -44,7 +44,7 @@ jobs:
|
|||
pip install -e .[test]
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ffmpeg
|
||||
coverage run -m pytest tests/unit && coverage xml -o /opt/coverage/unit/coverage.xml
|
||||
coverage run -m pytest --reruns 3 --reruns-delay 5 tests/unit && coverage xml -o /opt/coverage/unit/coverage.xml
|
||||
|
||||
- name: Save coverage
|
||||
uses: actions/cache@v3
|
||||
|
|
@ -70,7 +70,7 @@ jobs:
|
|||
pip install -e .[test]
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ffmpeg
|
||||
coverage run -m pytest tests/e2e/soundcloud && coverage xml -o /opt/coverage/soundcloud/coverage.xml
|
||||
coverage run -m pytest --reruns 3 --reruns-delay 5 tests/e2e/soundcloud && coverage xml -o /opt/coverage/soundcloud/coverage.xml
|
||||
|
||||
test-bandcamp:
|
||||
runs-on: ubuntu-22.04
|
||||
|
|
@ -90,7 +90,7 @@ jobs:
|
|||
pip install -e .[test]
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ffmpeg
|
||||
coverage run -m pytest tests/e2e/bandcamp && coverage xml -o /opt/coverage/bandcamp/coverage.xml
|
||||
coverage run -m pytest --reruns 3 --reruns-delay 5 tests/e2e/bandcamp && coverage xml -o /opt/coverage/bandcamp/coverage.xml
|
||||
|
||||
- name: Save coverage
|
||||
uses: actions/cache@v3
|
||||
|
|
@ -116,7 +116,7 @@ jobs:
|
|||
pip install -e .[test]
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ffmpeg
|
||||
coverage run -m pytest tests/e2e/youtube && coverage xml -o /opt/coverage/youtube/coverage.xml
|
||||
coverage run -m pytest --reruns 3 --reruns-delay 5 tests/e2e/youtube && coverage xml -o /opt/coverage/youtube/coverage.xml
|
||||
|
||||
- name: Save coverage
|
||||
uses: actions/cache@v3
|
||||
|
|
@ -142,7 +142,7 @@ jobs:
|
|||
pip install -e .[test]
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ffmpeg
|
||||
coverage run -m pytest tests/e2e/plugins && coverage xml -o /opt/coverage/plugins/coverage.xml
|
||||
coverage run -m pytest --reruns 3 --reruns-delay 5 tests/e2e/plugins && coverage xml -o /opt/coverage/plugins/coverage.xml
|
||||
|
||||
- name: Save coverage
|
||||
uses: actions/cache@v3
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ where=src
|
|||
test =
|
||||
coverage[toml]==6.3.2
|
||||
pytest==7.1.1
|
||||
pytest-rerunfailures==12.0
|
||||
lint =
|
||||
black==22.3.0
|
||||
isort==5.10.1
|
||||
|
|
|
|||
Loading…
Reference in a new issue