Skip to content

Commit c02ee57

Browse files
committed
Bump files with dotnet-file sync
# devlooped/oss - Bump to include action that disables nested includes devlooped/oss@66caefb - Fix initial test run without filter devlooped/oss@9a1b075 - Remove a bit the space above the button devlooped/oss@56086e5 - Add sponsors and footer to docs devlooped/oss@923ddc1 - Revert "Add default package source mapping for central package versions" devlooped/oss@1537aa9 - Ensure ruby v3 is installed for changelog generation devlooped/oss@be8f625 - Add icon prefix to match dependabot devlooped/oss@2a39a42 - Add rate limiting fix devlooped/oss@ef47d78 - Reuse test with retries definition by using a composite action devlooped/oss@3b9f317 - Now that .NET6 is LTS, ensure it's installed devlooped/oss@7ebebbd - Remove GNU grep step from publish since it runs ubuntu devlooped/oss@0e5a33c - Ignore azurite files devlooped/oss@829faad - Add azurite hidden folders too devlooped/oss@978c71c - Ignore *.log files devlooped/oss@c78868e - Global tools should run on whatever latest runtime is installed. devlooped/oss@b65c8f1 - Ensure MSBuild tooling can access package artifacts always via PKG_[PackageId] devlooped/oss@cc6922f - Add CI as a project property devlooped/oss@2fea462 - Add RepositoryBranch as a ThisAssembly.Project property devlooped/oss@83d7378 - Add RepositoryRoot property from source control information devlooped/oss@f9763d3 - Add RepositoryUrl as project property, if available devlooped/oss@4f57ffe - Remove DumpItems task. Easily replaceable with MSBuild.DumpItems devlooped/oss@024f733 - Ignore xUnit1013 so records can be used as test classes devlooped/oss@369cd2b - Remove the source link in the package description devlooped/oss@b9fb0a7 - Switch to windows-latest agent which is now .NET6 devlooped/oss@445239b - Ignore nuget-provided files for formatting devlooped/oss@bbf637b - Ignore changes to readme.md as build trigger devlooped/oss@e19ed32 # devlooped/.github - Fix for installing gh as admin devlooped/.github@8b6384e
1 parent a724d94 commit c02ee57

16 files changed

Lines changed: 233 additions & 158 deletions

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,5 +88,5 @@ csharp_new_line_before_finally = true
8888
csharp_new_line_before_members_in_object_initializers = true
8989
csharp_new_line_before_members_in_anonymous_types = true
9090

91-
# xUnit1013: Public method should be marked as test
91+
# xUnit1013: Public method should be marked as test. Allows using records as test classes
9292
dotnet_diagnostic.xUnit1013.severity = none

.github/workflows/build.yml

Lines changed: 9 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
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"
@@ -72,34 +70,7 @@ jobs:
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"

.github/workflows/changelog.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,14 @@ jobs:
2424
ref: main
2525
token: ${{ env.GH_TOKEN }}
2626

27+
- name: ⚙ ruby
28+
uses: ruby/setup-ruby@v1
29+
with:
30+
ruby-version: 3.0.3
31+
2732
- name: ⚙ changelog
2833
run: |
29-
sudo gem install github_changelog_generator
34+
gem install github_changelog_generator
3035
github_changelog_generator --user ${GITHUB_REPOSITORY%/*} --project ${GITHUB_REPOSITORY##*/} --token ${{ secrets.GITHUB_TOKEN }} --o changelog.md --config-file .github/.github_changelog_generator
3136
3237
- name: 🚀 changelog

.github/workflows/dotnet-file.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Synchronizes .netconfig-configured files with dotnet-file
1+
# Synchronizes .netconfig-configured files with dotnet-file
22
name: dotnet-file
33
on:
44
workflow_dispatch:
@@ -22,6 +22,22 @@ jobs:
2222
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2323
run: echo "GH_TOKEN=${GITHUB_TOKEN}" >> $GITHUB_ENV
2424

25+
- name: ⌛ rate
26+
shell: pwsh
27+
run: |
28+
# add random sleep since we run on fixed schedule
29+
sleep (get-random -max 60)
30+
# get currently authenticated user rate limit info
31+
$rate = gh api rate_limit | convertfrom-json | select -expandproperty rate
32+
# if we don't have at least 100 requests left, wait until reset
33+
if ($rate.remaining -lt 10) {
34+
$wait = ($rate.reset - (Get-Date (Get-Date).ToUniversalTime() -UFormat %s))
35+
echo "Rate limit remaining is $($rate.remaining), waiting for $($wait / 1000) seconds to reset"
36+
sleep $wait
37+
$rate = gh api rate_limit | convertfrom-json | select -expandproperty rate
38+
echo "Rate limit has reset to $($rate.remaining) requests"
39+
}
40+
2541
- name: 🤘 checkout
2642
uses: actions/checkout@v2
2743
with:
@@ -30,6 +46,7 @@ jobs:
3046
token: ${{ env.GH_TOKEN }}
3147

3248
- name: 🔄 sync
49+
shell: pwsh
3350
run: |
3451
dotnet tool update -g dotnet-gcm
3552
dotnet gcm store --protocol=https --host=github.com --username=$env:GITHUB_ACTOR --password=$env:GH_TOKEN
@@ -53,7 +70,7 @@ jobs:
5370
branch: dotnet-file-sync
5471
delete-branch: true
5572
labels: dependencies
56-
commit-message: Bump files with dotnet-file sync
73+
commit-message: ⬆️ Bump files with dotnet-file sync
5774

5875
${{ env.CHANGES }}
5976
title: "Bump files with dotnet-file sync"

.github/workflows/includes.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: +M▼ includes
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- 'main'
7+
paths:
8+
- '**.md'
9+
10+
jobs:
11+
includes:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: 🤘 checkout
15+
uses: actions/checkout@v2
16+
17+
- name: +M▼ includes
18+
uses: devlooped/actions-include@v4
19+
20+
- name: ✍ pull request
21+
uses: peter-evans/create-pull-request@v3
22+
with:
23+
base: main
24+
branch: markdown-includes
25+
delete-branch: true
26+
commit-message: +M▼ includes
27+
title: +M▼ includes
28+
body: +M▼ includes

.github/workflows/publish.yml

Lines changed: 4 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -20,51 +20,17 @@ jobs:
2020
with:
2121
submodules: recursive
2222
fetch-depth: 0
23-
24-
- name: ⚙ dotnet 6.0.x
23+
24+
- name: ⚙ dotnet
2525
uses: actions/setup-dotnet@v1
2626
with:
27-
dotnet-version: 6.0.x
28-
include-prerelease: true
27+
dotnet-version: '6.0.x'
2928

3029
- name: 🙏 build
3130
run: dotnet build -m:1 -p:version=${GITHUB_REF#refs/*/v}
3231

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

6935
- name: 📦 pack
7036
run: dotnet pack -m:1 -p:version=${GITHUB_REF#refs/*/v}

.github/workflows/release-notes.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,21 @@ jobs:
2020
- name: 🏷 since
2121
run: echo "SINCE_TAG=$(git describe --abbrev=0 --tags $(git rev-list --tags --skip=1 --max-count=1))" >> $GITHUB_ENV
2222

23+
- name: ⚙ ruby
24+
uses: ruby/setup-ruby@v1
25+
with:
26+
ruby-version: 3.0.3
27+
2328
- name: ⚙ changelog
2429
if: env.SINCE_TAG != ''
2530
run: |
26-
sudo gem install github_changelog_generator
31+
gem install github_changelog_generator
2732
github_changelog_generator --since-tag ${{ env.SINCE_TAG }} --user ${GITHUB_REPOSITORY%/*} --project ${GITHUB_REPOSITORY##*/} --token ${{ secrets.GITHUB_TOKEN }} --o changelog.md --config-file .github/.github_changelog_generator
2833
2934
- name: ⚙ changelog
3035
if: env.SINCE_TAG == ''
3136
run: |
32-
sudo gem install github_changelog_generator
37+
gem install github_changelog_generator
3338
github_changelog_generator --user ${GITHUB_REPOSITORY%/*} --project ${GITHUB_REPOSITORY##*/} --token ${{ secrets.GITHUB_TOKEN }} --o changelog.md --config-file .github/.github_changelog_generator
3439
3540
- name: 🖉 release

.github/workflows/sponsors.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
- name: 🔽 gh
1616
run: |
17-
iwr -useb get.scoop.sh | iex
17+
iex "& {$(irm get.scoop.sh)} -RunAsAdmin"
1818
scoop install gh
1919
2020
- name: 💛 sponsors

.github/workflows/test/action.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: test
2+
description: runs dotnet tests with retry
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: 🧪 test
7+
shell: bash --noprofile --norc {0}
8+
env:
9+
LC_ALL: en_US.utf8
10+
run: |
11+
[ -f .bash_profile ] && source .bash_profile
12+
counter=0
13+
exitcode=0
14+
reset="\e[0m"
15+
warn="\e[0;33m"
16+
while [ $counter -lt 6 ]
17+
do
18+
# run test and forward output also to a file in addition to stdout (tee command)
19+
if [ $filter ]
20+
then
21+
echo -e "${warn}Retry $counter for $filter ${reset}"
22+
dotnet test --no-build -m:1 --blame-hang --blame-hang-timeout 5m --filter=$filter | tee ./output.log
23+
else
24+
dotnet test --no-build -m:1 --blame-hang --blame-hang-timeout 5m | tee ./output.log
25+
fi
26+
# capture dotnet test exit status, different from tee
27+
exitcode=${PIPESTATUS[0]}
28+
if [ $exitcode == 0 ]
29+
then
30+
exit 0
31+
fi
32+
# cat output, get failed test names, remove trailing whitespace, sort+dedupe, join as FQN~TEST with |, remove trailing |.
33+
filter=$(cat ./output.log | grep -o -P '(?<=\sFailed\s)[\w\._]*' | sed 's/ *$//g' | sort -u | awk 'BEGIN { ORS="|" } { print("FullyQualifiedName~" $0) }' | grep -o -P '.*(?=\|$)')
34+
((counter++))
35+
done
36+
exit $exitcode

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@ TestResults
1313
*.nupkg
1414
*.metaproj
1515
*.tmp
16+
*.log
1617
*.cache
1718
*.binlog
1819
*.zip
20+
__azurite*.*
21+
__*__
1922

2023
.nuget
2124
*.lock.json

0 commit comments

Comments
 (0)