Skip to content

Commit 6264305

Browse files
alimcmaster1Pingviinituutti
authored andcommitted
CI: Fail Azure CI for failing tests (pandas-dev#23454)
1 parent 0a2e31b commit 6264305

File tree

5 files changed

+77
-1
lines changed

5 files changed

+77
-1
lines changed

ci/azure/linux.yml

+25
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,28 @@ jobs:
5454
inputs:
5555
testResultsFiles: 'test-data-*.xml'
5656
testRunTitle: 'Linux'
57+
- powershell: |
58+
$junitXml = "test-data-single.xml"
59+
$(Get-Content $junitXml | Out-String) -match 'failures="(.*?)"'
60+
if ($matches[1] -eq 0)
61+
{
62+
Write-Host "No test failures in test-data-single"
63+
}
64+
else
65+
{
66+
# note that this will produce $LASTEXITCODE=1
67+
Write-Error "$($matches[1]) tests failed"
68+
}
69+
70+
$junitXmlMulti = "test-data-multiple.xml"
71+
$(Get-Content $junitXmlMulti | Out-String) -match 'failures="(.*?)"'
72+
if ($matches[1] -eq 0)
73+
{
74+
Write-Host "No test failures in test-data-multi"
75+
}
76+
else
77+
{
78+
# note that this will produce $LASTEXITCODE=1
79+
Write-Error "$($matches[1]) tests failed"
80+
}
81+
displayName: Check for test failures

ci/azure/macos.yml

+25
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,28 @@ jobs:
4141
inputs:
4242
testResultsFiles: 'test-data-*.xml'
4343
testRunTitle: 'MacOS-35'
44+
- powershell: |
45+
$junitXml = "test-data-single.xml"
46+
$(Get-Content $junitXml | Out-String) -match 'failures="(.*?)"'
47+
if ($matches[1] -eq 0)
48+
{
49+
Write-Host "No test failures in test-data-single"
50+
}
51+
else
52+
{
53+
# note that this will produce $LASTEXITCODE=1
54+
Write-Error "$($matches[1]) tests failed"
55+
}
56+
57+
$junitXmlMulti = "test-data-multiple.xml"
58+
$(Get-Content $junitXmlMulti | Out-String) -match 'failures="(.*?)"'
59+
if ($matches[1] -eq 0)
60+
{
61+
Write-Host "No test failures in test-data-multi"
62+
}
63+
else
64+
{
65+
# note that this will produce $LASTEXITCODE=1
66+
Write-Error "$($matches[1]) tests failed"
67+
}
68+
displayName: Check for test failures

ci/azure/windows-py27.yml

+13
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,16 @@ jobs:
4343
inputs:
4444
testResultsFiles: 'test-data.xml'
4545
testRunTitle: 'Windows 27'
46+
- powershell: |
47+
$junitXml = "test-data.xml"
48+
$(Get-Content $junitXml | Out-String) -match 'failures="(.*?)"'
49+
if ($matches[1] -eq 0)
50+
{
51+
Write-Host "No test failures in test-data"
52+
}
53+
else
54+
{
55+
# note that this will produce $LASTEXITCODE=1
56+
Write-Error "$($matches[1]) tests failed"
57+
}
58+
displayName: Check for test failures

ci/azure/windows.yml

+13
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,16 @@ jobs:
3434
inputs:
3535
testResultsFiles: 'test-data.xml'
3636
testRunTitle: 'Windows 36'
37+
- powershell: |
38+
$junitXml = "test-data.xml"
39+
$(Get-Content $junitXml | Out-String) -match 'failures="(.*?)"'
40+
if ($matches[1] -eq 0)
41+
{
42+
Write-Host "No test failures in test-data"
43+
}
44+
else
45+
{
46+
# note that this will produce $LASTEXITCODE=1
47+
Write-Error "$($matches[1]) tests failed"
48+
}
49+
displayName: Check for test failures

ci/deps/azure-macos-35.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dependencies:
1212
- nomkl
1313
- numexpr
1414
- numpy=1.12.0
15-
- openpyxl
15+
- openpyxl=2.5.5
1616
- pytables
1717
- python=3.5*
1818
- pytz

0 commit comments

Comments
 (0)