@@ -1446,6 +1446,15 @@ jobs:
1446
1446
echo "Create the folder to put the all.out file"
1447
1447
TARGET_BUCKET=`echo $RANDOM | md5sum | head -c 20; echo;`
1448
1448
echo "TARGET_BUCKET: ${TARGET_BUCKET}"
1449
+ echo "Only run our test if play is up and running..."
1450
+ PLAY_IS_ON=`wget --spider --server-response https://play.min.io:9443/login 2>&1 | grep '200\ OK' | wc -l`
1451
+ if [ $PLAY_IS_ON == 1 ]
1452
+ then
1453
+ echo "Play is up and running, we will proceed with the test"
1454
+ else
1455
+ echo "Play is down, please report it on hack channel"
1456
+ exit
1457
+ fi
1449
1458
./mc mb --ignore-existing play/${TARGET_BUCKET}/
1450
1459
./mc version enable play/${TARGET_BUCKET}
1451
1460
# Via API we are going to test:
@@ -1588,19 +1597,27 @@ jobs:
1588
1597
wget -q https://dl.min.io/client/mc/release/linux-amd64/mc
1589
1598
echo "Change the permissions to execute mc command"
1590
1599
chmod +x mc
1591
- echo "Create the folder to put the all.out file"
1592
- ./mc mb --ignore-existing play/builds/
1593
- echo "Copy the all.out file to play bucket"
1594
- echo ${{ github.repository }}
1595
- echo ${{ github.event.number }}
1596
- echo ${{ github.run_id }}
1597
- # mc cp can fail due to lack of space: mc: <ERROR> Failed to copy `all.out`.
1598
- # Storage backend has reached its minimum free disk threshold. Please delete a few objects to proceed.
1599
- ./mc cp all.out play/builds/${{ github.repository }}/${{ github.event.number }}/${{ github.run_id }}/ || true
1600
- ./mc cp all.out play/builds/${{ github.repository }}/${{ github.event.number }}/latest/ || true
1601
- go tool cover -html=all.out -o coverage.html
1602
- ./mc cp coverage.html play/builds/${{ github.repository }}/${{ github.event.number }}/${{ github.run_id }}/ || true
1603
- ./mc cp coverage.html play/builds/${{ github.repository }}/${{ github.event.number }}/latest/ || true
1600
+ echo "Only run our test if play is up and running since we require it for replication tests here."
1601
+ PLAY_IS_ON=`wget --spider --server-response https://play.min.io:9443/login 2>&1 | grep '200\ OK' | wc -l`
1602
+ if [ $PLAY_IS_ON == 1 ]
1603
+ then
1604
+ echo "Play is up and running, we will proceed with the play part for coverage"
1605
+ echo "Create the folder to put the all.out file"
1606
+ ./mc mb --ignore-existing play/builds/
1607
+ echo "Copy the all.out file to play bucket"
1608
+ echo ${{ github.repository }}
1609
+ echo ${{ github.event.number }}
1610
+ echo ${{ github.run_id }}
1611
+ # mc cp can fail due to lack of space: mc: <ERROR> Failed to copy `all.out`.
1612
+ # Storage backend has reached its minimum free disk threshold. Please delete a few objects to proceed.
1613
+ ./mc cp all.out play/builds/${{ github.repository }}/${{ github.event.number }}/${{ github.run_id }}/ || true
1614
+ ./mc cp all.out play/builds/${{ github.repository }}/${{ github.event.number }}/latest/ || true
1615
+ go tool cover -html=all.out -o coverage.html
1616
+ ./mc cp coverage.html play/builds/${{ github.repository }}/${{ github.event.number }}/${{ github.run_id }}/ || true
1617
+ ./mc cp coverage.html play/builds/${{ github.repository }}/${{ github.event.number }}/latest/ || true
1618
+ else
1619
+ echo "Play is down, please report it on hack channel, no coverage is going to be uploaded!!!"
1620
+ fi
1604
1621
echo "grep to obtain the result"
1605
1622
go tool cover -func=all.out | grep total > tmp2
1606
1623
result=`cat tmp2 | awk 'END {print $3}'`
0 commit comments