generated from easy-template/csharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 52d8ca1
Showing
17 changed files
with
1,953 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto | ||
|
||
# Custom for Visual Studio | ||
*.cs diff=csharp | ||
*.sln merge=union | ||
*.csproj merge=union | ||
*.vbproj merge=union | ||
*.fsproj merge=union | ||
*.dbproj merge=union | ||
|
||
# Standard to msysgit | ||
*.doc diff=astextplain | ||
*.DOC diff=astextplain | ||
*.docx diff=astextplain | ||
*.DOCX diff=astextplain | ||
*.dot diff=astextplain | ||
*.DOT diff=astextplain | ||
*.pdf diff=astextplain | ||
*.PDF diff=astextplain | ||
*.rtf diff=astextplain | ||
*.RTF diff=astextplain | ||
|
||
# Needed for Mono build shell script | ||
*.sh -text eol=lf | ||
*.yml -text eol=lf | ||
*.key eol=lf | ||
*.json eol=lf | ||
|
||
# Needed for API Approvals | ||
*.txt text eol=crlf | ||
|
||
build.sh eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: nuget | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
time: "20:00" | ||
open-pull-requests-limit: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: CD | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
Build-and-Tests: | ||
name: Build and Test | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: running infrastructure | ||
run: | | ||
cd infrastructure | ||
docker-compose up -d | ||
sleep 2s | ||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 7.x.x | ||
- name: Install dependencies | ||
run: | | ||
cd src | ||
dotnet restore | ||
- name: Build | ||
run: | | ||
cd src | ||
dotnet build --configuration Debug --no-restore | ||
- name: Test | ||
run: | | ||
cd src | ||
dotnet test | ||
- id: get_version | ||
uses: seungyongshim/[email protected] | ||
- name: Modification Version | ||
run: | | ||
cd src | ||
sed -i "s/<Version>9999.0.0.000/<Version>${{ steps.get_version.outputs.version }}/g" ./Directory.Build.props | ||
cat ./Directory.Build.props | ||
- name: Generate NuGet packages | ||
run: | | ||
cd src | ||
dotnet pack -c Release -o nugets | ||
- name: Push packages to registry | ||
run: | | ||
cd src/nugets | ||
dotnet nuget push "*.nupkg" -k ${NUGET_API_KEY} -s https://api.nuget.org/v3/index.json --skip-duplicate | ||
env: | ||
NUGET_API_KEY: ${{ secrets.api }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ "*" ] | ||
pull_request: | ||
branches: [ "*" ] | ||
|
||
jobs: | ||
Build-and-Tests: | ||
name: Build and Test | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: running infrastructure | ||
run: | | ||
cd infrastructure | ||
docker-compose up -d | ||
sleep 2s | ||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 7.x.x | ||
- name: Add Nuget | ||
run: | | ||
cd src | ||
for proj in $(dotnet sln list | grep Tests) | ||
do | ||
dotnet add "$proj" package JunitXml.TestLogger || true | ||
done | ||
- name: Test | ||
run: | | ||
cd src | ||
dotnet clean | ||
dotnet restore | ||
dotnet test --logger "junit;LogFileName=Report.xml" --collect:"XPlat Code Coverage" | ||
- name: ReportGenerator | ||
uses: danielpalme/[email protected] | ||
with: | ||
reports: '**/coverage.cobertura.xml' | ||
reporttypes: 'Html;Badges' | ||
targetdir: 'docs' # REQUIRED # The directory where the generated report should be saved. | ||
historydir: 'docs/history' | ||
sourcedirs: 'src' | ||
- name: Push Report | ||
uses: EndBug/add-and-commit@v4 | ||
with: | ||
add: 'docs/*' | ||
message: "Coverage Report ${{github.sha}}" | ||
ref: 'gh-pages' | ||
remove: '' | ||
if: ${{ github.ref == 'refs/heads/master' }} | ||
- name: Publish Unit Test Results | ||
uses: docker://ghcr.io/enricomi/publish-unit-test-result-action:v1 | ||
if: ${{ github.ref == 'refs/heads/master' && always() }} | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
files: src/**/Report.xml |
Oops, something went wrong.