Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump files with dotnet-file sync #6

Merged
merged 3 commits into from
Sep 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ dotnet_style_require_accessibility_modifiers = omit_if_default:error
dotnet_diagnostic.IDE0040.severity = error

[*.cs]
# Top-level files are definitely OK
csharp_using_directive_placement = outside_namespace:silent
csharp_style_namespace_declarations = block_scoped:silent
csharp_prefer_simple_using_statement = true:suggestion
csharp_prefer_braces = true:silent

# Prefer "var" everywhere
csharp_style_var_for_built_in_types = true:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion
Expand Down Expand Up @@ -88,5 +94,16 @@ csharp_new_line_before_finally = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true

# xUnit1013: Public method should be marked as test
# Test settings
[**/*Tests*/**{.cs,.vb}]
# xUnit1013: Public method should be marked as test. Allows using records as test classes
dotnet_diagnostic.xUnit1013.severity = none

# CS9113: Parameter is unread (usually, ITestOutputHelper)
dotnet_diagnostic.CS9113.severity = none

# Default severity for analyzer diagnostics with category 'Style'
dotnet_analyzer_diagnostic.category-Style.severity = none

# VSTHRD200: Use "Async" suffix for async methods
dotnet_diagnostic.VSTHRD200.severity = none
50 changes: 0 additions & 50 deletions .github/ISSUE_TEMPLATE/bug.md

This file was deleted.

7 changes: 7 additions & 0 deletions .github/code_of_conduct.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Code of Conduct

This project has adopted the code of conduct defined by the
[Contributor Covenant](https://www.contributor-covenant.org/) to
clarify expected behavior in our community.

For more information, see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct).
35 changes: 35 additions & 0 deletions .github/contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Contributing

You can contribute to the project with issues and PRs.
Simply filing issues for problems you encounter is a great way to contribute. Contributing implementations is greatly appreciated.

## Before you file a bug...
* Is this a question, or are you looking for help? Ask it in the project's **Discussions** tab instead, if available.

* Did you search the issues list to see if someone already reported it? _When looking for duplicates, make sure to look through open **and** closed issues._
* Did you create a simple repro for the problem? _We won't look at your bug until you provide a repro project or complete repro steps._

## Before you submit a PR...

* Did you ensure there is a corresponding issue labelled as 🟢 help wanted?
If not, please open one to start the discussion.
* Does the code follow existing coding styles? (spaces, comments, no regions, etc.)?
We enforce the basic styles by running `dotnet format` on the repository root.
You can do the same before submitting a PR to speed up the process.
* Did you write unit tests?
Typically required if there are other unit tests for existing or related code.

## Looking for something to work on?

Look at the repo issues labelled as 🟢 help wanted and 🟣 good first issue to find
something to contribute!

# Contributor License Agreement

You must sign the [Contribution License Agreement (CLA)](https://cla-assistant.io/devlooped/) before your PR will be merged.
This is a one-time requirement for projects in the Devlooped organization.
You can read more about [Contribution License Agreements (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) on Wikipedia.

You don't have to do this up-front. You can simply clone, fork, and submit your pull-request as usual.
When your pull-request is created, it is classified by a CLA bot, which will let
you know if signing is pending.
33 changes: 32 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,35 @@ updates:
- package-ecosystem: nuget
directory: /
schedule:
interval: weekly
interval: daily
groups:
Azure:
patterns:
- "Azure*"
- "Microsoft.Azure*"
Identity:
patterns:
- "System.IdentityModel*"
- "Microsoft.IdentityModel*"
System:
patterns:
- "System*"
exclude-patterns:
- "System.IdentityModel*"
Extensions:
patterns:
- "Microsoft.Extensions*"
Web:
patterns:
- "Microsoft.AspNetCore*"
Tests:
patterns:
- "Microsoft.NET.Test*"
- "xunit*"
- "coverlet*"
ThisAssembly:
patterns:
- "ThisAssembly*"
ProtoBuf:
patterns:
- "protobuf-*"
32 changes: 32 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
changelog:
exclude:
labels:
- bydesign
- dependencies
- duplicate
- question
- invalid
- wontfix
- need info
- docs
- techdebt
authors:
- devlooped-bot
- dependabot
- github-actions
categories:
- title: ✨ Implemented enhancements
labels:
- enhancement
- title: 🐛 Fixed bugs
labels:
- bug
- title: 📝 Documentation updates
labels:
- docs
- title: 🔨 Other
labels:
- '*'
exclude:
labels:
- dependencies
File renamed without changes.
File renamed without changes.
109 changes: 54 additions & 55 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,100 +4,99 @@
name: build
on:
workflow_dispatch:
inputs:
configuration:
type: choice
description: Configuration
options:
- Release
- Debug
push:
branches: [ main, dev, 'feature/*', 'rel/*' ]
branches: [ main, dev, 'dev/*', 'feature/*', 'rel/*' ]
paths-ignore:
- changelog.md
- code-of-conduct.md
- security.md
- support.md
- readme.md
pull_request:
types: [opened, synchronize, reopened]

env:
DOTNET_NOLOGO: true
PackOnBuild: true
GeneratePackageOnBuild: true
VersionPrefix: 42.42.${{ github.run_number }}
VersionLabel: ${{ github.ref }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
MSBUILDTERMINALLOGGER: auto
Configuration: ${{ github.event.inputs.configuration || 'Release' }}

defaults:
run:
shell: bash

jobs:
dotnet-format:
os-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.lookup.outputs.matrix }}
steps:
- name: 🤘 checkout
uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0

- name: ✓ ensure format
uses: actions/checkout@v4

- name: 🔎 lookup
id: lookup
shell: pwsh
run: |
dotnet tool update -g dotnet-format --version 5.0.*
dotnet restore
dotnet format --check -v:diag
$path = './.github/workflows/os-matrix.json'
$os = if (test-path $path) { cat $path } else { '["ubuntu-latest"]' }
echo "matrix=$os" >> $env:GITHUB_OUTPUT

build:
needs: os-matrix
name: build-${{ matrix.os }}
needs: dotnet-format
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
os: ${{ fromJSON(needs.os-matrix.outputs.matrix) }}
steps:
- name: 🤘 checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: 🙏 build
run: dotnet build -m:1 -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER"

- name: ⚙ GNU grep
if: matrix.os == 'macOS-latest'
run: |
brew install grep
echo 'export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH"' >> .bash_profile
run: dotnet build -m:1 -bl:build.binlog

- name: 🧪 test
shell: bash --noprofile --norc {0}
env:
LC_ALL: en_US.utf8
run: |
[ -f .bash_profile ] && source .bash_profile
counter=0
exitcode=0
reset="\e[0m"
warn="\e[0;33m"
while [ $counter -lt 6 ]
do
if [ $filter ]
then
echo -e "${warn}Retry $counter for $filter ${reset}"
fi
# run test and forward output also to a file in addition to stdout (tee command)
dotnet test --no-build -m:1 --blame-hang --blame-hang-timeout 5m --filter=$filter | tee ./output.log
# capture dotnet test exit status, different from tee
exitcode=${PIPESTATUS[0]}
if [ $exitcode == 0 ]
then
exit 0
fi
# cat output, get failed test names, join as DisplayName=TEST with |, remove trailing |.
filter=$(cat ./output.log | grep -o -P '(?<=\sFailed\s)\w*' | awk 'BEGIN { ORS="|" } { print("DisplayName=" $0) }' | grep -o -P '.*(?=\|$)')
((counter++))
done
exit $exitcode
dotnet tool update -g dotnet-retest
dotnet retest -- --no-build

- name: 📦 pack
run: dotnet pack -m:1 -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER"
- name: 🐛 logs
uses: actions/upload-artifact@v3
if: runner.debug && always()
with:
name: logs
path: '*.binlog'

# Only push CI package to sleet feed if building on ubuntu (fastest)
- name: 🚀 sleet
env:
SLEET_CONNECTION: ${{ secrets.SLEET_CONNECTION }}
if: matrix.os == 'ubuntu-latest' && env.SLEET_CONNECTION != ''
if: env.SLEET_CONNECTION != ''
run: |
dotnet tool install -g --version 4.0.18 sleet
sleet push bin --config none -f --verbose -p "SLEET_FEED_CONTAINER=nuget" -p "SLEET_FEED_CONNECTIONSTRING=${{ secrets.SLEET_CONNECTION }}" -p "SLEET_FEED_TYPE=azure" || echo "No packages found"

dotnet-format:
runs-on: ubuntu-latest
steps:
- name: 🤘 checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: ✓ ensure format
run: |
dotnet format whitespace --verify-no-changes -v:diag --exclude ~/.nuget
dotnet format style --verify-no-changes -v:diag --exclude ~/.nuget
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
usernames-as-github-logins=true
issues_wo_labels=true
pr_wo_labels=true
exclude-labels=bydesign,dependencies,duplicate,question,invalid,wontfix,need info
exclude-labels=bydesign,dependencies,duplicate,discussion,question,invalid,wontfix,need info,docs
enhancement-label=:sparkles: Implemented enhancements:
bugs-label=:bug: Fixed bugs:
issues-label=:hammer: Other:
Expand Down
Loading