Skip to content

Commit d18c4b5

Browse files
committed
Bump files with dotnet-file sync
# devlooped/oss - Automatically retry failed tests up to 5 times devlooped/oss@8bc16a7 - Ensure GNU grep is used on macOS devlooped/oss@964caa3
1 parent 0718c39 commit d18c4b5

3 files changed

Lines changed: 72 additions & 24 deletions

File tree

.github/workflows/build.yml

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,6 @@ jobs:
3131
submodules: recursive
3232
fetch-depth: 0
3333

34-
- name: ⚙ dotnet 6.0.x
35-
uses: actions/setup-dotnet@v1
36-
with:
37-
dotnet-version: 6.0.x
38-
include-prerelease: true
39-
4034
- name: ✓ ensure format
4135
run: |
4236
dotnet tool update -g dotnet-format --version 5.0.*
@@ -57,17 +51,44 @@ jobs:
5751
submodules: recursive
5852
fetch-depth: 0
5953

60-
- name: ⚙ dotnet 6.0.x
61-
uses: actions/setup-dotnet@v1
62-
with:
63-
dotnet-version: 6.0.x
64-
include-prerelease: true
65-
6654
- name: 🙏 build
6755
run: dotnet build -m:1 -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER"
6856

57+
- name: ⚙ GNU grep
58+
if: matrix.os == 'macOS-latest'
59+
run: |
60+
brew install grep
61+
echo 'export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH"' >> .bash_profile
62+
6963
- name: 🧪 test
70-
run: dotnet test --no-build -m:1 --blame-hang --blame-hang-timeout 5m
64+
shell: bash --noprofile --norc {0}
65+
env:
66+
LC_ALL: en_US.utf8
67+
run: |
68+
[ -f .bash_profile ] && source .bash_profile
69+
counter=0
70+
exitcode=0
71+
reset="\e[0m"
72+
warn="\e[0;33m"
73+
while [ $counter -lt 6 ]
74+
do
75+
if [ $filter ]
76+
then
77+
echo -e "${warn}Retry $counter for $filter ${reset}"
78+
fi
79+
# run test and forward output also to a file in addition to stdout (tee command)
80+
dotnet test --no-build -m:1 --blame-hang --blame-hang-timeout 5m --filter=$filter | tee ./output.log
81+
# capture dotnet test exit status, different from tee
82+
exitcode=${PIPESTATUS[0]}
83+
if [ $exitcode == 0 ]
84+
then
85+
exit 0
86+
fi
87+
# cat output, get failed test names, join as DisplayName=TEST with |, remove trailing |.
88+
filter=$(cat ./output.log | grep -o -P '(?<=\sFailed\s)\w*' | awk 'BEGIN { ORS="|" } { print("DisplayName=" $0) }' | grep -o -P '.*(?=\|$)')
89+
((counter++))
90+
done
91+
exit $exitcode
7192
7293
- name: 📦 pack
7394
run: dotnet pack -m:1 -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER"

.github/workflows/publish.yml

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,44 @@ jobs:
2121
submodules: recursive
2222
fetch-depth: 0
2323

24-
- name: ⚙ dotnet 6.0.x
25-
uses: actions/setup-dotnet@v1
26-
with:
27-
dotnet-version: 6.0.x
28-
include-prerelease: true
29-
3024
- name: 🙏 build
3125
run: dotnet build -m:1 -p:version=${GITHUB_REF#refs/*/v}
3226

27+
- name: ⚙ GNU grep
28+
if: matrix.os == 'macOS-latest'
29+
run: |
30+
brew install grep
31+
echo 'export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH"' >> .bash_profile
32+
3333
- name: 🧪 test
34-
run: dotnet test --no-build -m:1
34+
shell: bash --noprofile --norc {0}
35+
env:
36+
LC_ALL: en_US.utf8
37+
run: |
38+
[ -f .bash_profile ] && source .bash_profile
39+
counter=0
40+
exitcode=0
41+
reset="\e[0m"
42+
warn="\e[0;33m"
43+
while [ $counter -lt 6 ]
44+
do
45+
if [ $filter ]
46+
then
47+
echo -e "${warn}Retry $counter for $filter ${reset}"
48+
fi
49+
# run test and forward output also to a file in addition to stdout (tee command)
50+
dotnet test --no-build -m:1 --blame-hang --blame-hang-timeout 5m --filter=$filter | tee ./output.log
51+
# capture dotnet test exit status, different from tee
52+
exitcode=${PIPESTATUS[0]}
53+
if [ $exitcode == 0 ]
54+
then
55+
exit 0
56+
fi
57+
# cat output, get failed test names, join as DisplayName=TEST with |, remove trailing |.
58+
filter=$(cat ./output.log | grep -o -P '(?<=\sFailed\s)\w*' | awk 'BEGIN { ORS="|" } { print("DisplayName=" $0) }' | grep -o -P '.*(?=\|$)')
59+
((counter++))
60+
done
61+
exit $exitcode
3562
3663
- name: 📦 pack
3764
run: dotnet pack -m:1 -p:version=${GITHUB_REF#refs/*/v}

.netconfig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
weak
5050
[file ".github/workflows/build.yml"]
5151
url = https://github.com/devlooped/oss/blob/main/.github/workflows/build.yml
52-
sha = fc5889d5387e2d5aa7aba279b2aa12251cf08cb2
53-
etag = 91e9a208cd134bd7b71d7419800c613bc50a30e21e605607528721f2acdeab86
52+
sha = 964caa363fe9cd8ef01c8a5d8e3fd07d1aed35ae
53+
etag = ef5ed75b1e23292dd7af196a11f04760aa5ad4a3f374095395da9abc2de3f24f
5454
weak
5555
[file ".github/workflows/changelog.yml"]
5656
url = https://github.com/devlooped/oss/blob/main/.github/workflows/changelog.yml
@@ -64,8 +64,8 @@
6464
weak
6565
[file ".github/workflows/publish.yml"]
6666
url = https://github.com/devlooped/oss/blob/main/.github/workflows/publish.yml
67-
sha = 55c0b32601e94e1eed35028a0cad510c6bcbb265
68-
etag = ad8681ee3f191f796944135772b74565c470e349464e793aa664c888f7784b7a
67+
sha = 964caa363fe9cd8ef01c8a5d8e3fd07d1aed35ae
68+
etag = d6369e92c55eb78322ff39d26fc4ef1996b691a8ce05392395ab393e14ddb940
6969
weak
7070
[file ".github/workflows/release-notes.yml"]
7171
url = https://github.com/devlooped/oss/blob/main/.github/workflows/release-notes.yml

0 commit comments

Comments
 (0)