1111 - code-of-conduct.md
1212 - security.md
1313 - support.md
14+ - readme.md
1415 pull_request :
1516 types : [opened, synchronize, reopened]
1617
@@ -31,36 +32,33 @@ jobs:
3132 submodules : recursive
3233 fetch-depth : 0
3334
34- - name : ⚙ dotnet 6.0.x
35+ - name : ⚙ dotnet
3536 uses : actions/setup-dotnet@v1
3637 with :
37- dotnet-version : 6.0.x
38- include-prerelease : true
38+ dotnet-version : ' 6.0.x'
3939
4040 - name : ✓ ensure format
41- run : |
42- dotnet restore
43- dotnet format --verify-no-changes -v:diag
41+ run : dotnet format --verify-no-changes -v:diag --exclude ~/.nuget
4442
4543 build :
4644 name : build-${{ matrix.os }}
4745 needs : dotnet-format
4846 runs-on : ${{ matrix.os }}
4947 strategy :
5048 matrix :
51- os : [ubuntu -latest, windows -latest, macOS-latest]
49+ os : [windows -latest, ubuntu -latest, macOS-latest]
5250 steps :
5351 - name : 🤘 checkout
5452 uses : actions/checkout@v2
5553 with :
5654 submodules : recursive
5755 fetch-depth : 0
5856
59- - name : ⚙ dotnet 6.0.x
57+ - name : ⚙ dotnet
6058 uses : actions/setup-dotnet@v1
59+ if : matrix.os != 'windows-latest'
6160 with :
62- dotnet-version : 6.0.x
63- include-prerelease : true
61+ dotnet-version : ' 6.0.x'
6462
6563 - name : 🙏 build
6664 run : dotnet build -m:1 -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER"
7270 echo 'export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH"' >> .bash_profile
7371
7472 - name : 🧪 test
75- shell : bash --noprofile --norc {0}
76- env :
77- LC_ALL : en_US.utf8
78- run : |
79- [ -f .bash_profile ] && source .bash_profile
80- counter=0
81- exitcode=0
82- reset="\e[0m"
83- warn="\e[0;33m"
84- while [ $counter -lt 6 ]
85- do
86- if [ $filter ]
87- then
88- echo -e "${warn}Retry $counter for $filter ${reset}"
89- fi
90- # run test and forward output also to a file in addition to stdout (tee command)
91- dotnet test --no-build -m:1 --blame-hang --blame-hang-timeout 5m --filter=$filter | tee ./output.log
92- # capture dotnet test exit status, different from tee
93- exitcode=${PIPESTATUS[0]}
94- if [ $exitcode == 0 ]
95- then
96- exit 0
97- fi
98- # cat output, get failed test names, join as DisplayName=TEST with |, remove trailing |.
99- filter=$(cat ./output.log | grep -o -P '(?<=\sFailed\s)\w*' | awk 'BEGIN { ORS="|" } { print("DisplayName=" $0) }' | grep -o -P '.*(?=\|$)')
100- ((counter++))
101- done
102- exit $exitcode
73+ uses : ./.github/workflows/test
10374
10475 - name : 📦 pack
10576 run : dotnet pack -m:1 -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER"
0 commit comments