Skip to content

Commit 6b86e37

Browse files
author
unknown
committed
first commit
0 parents  commit 6b86e37

94 files changed

Lines changed: 4655 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 386 additions & 0 deletions
Large diffs are not rendered by default.

.github/dependabot.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "nuget" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"
12+
13+
- package-ecosystem: "github-actions" # See documentation for possible values
14+
directory: "/" # Location of package manifests
15+
schedule:
16+
interval: "weekly"

.github/workflows/build_app.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Build SenNotes
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
workflow_dispatch:
11+
12+
defaults:
13+
run:
14+
shell: pwsh
15+
16+
env:
17+
version: "1.0.${{ github.run_number }}"
18+
19+
jobs:
20+
build:
21+
runs-on: windows-latest
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: Set up .NET Core
27+
uses: actions/setup-dotnet@v4
28+
with:
29+
dotnet-version: '8.x'
30+
31+
- name: dotnet build
32+
run: dotnet build --configuration Release -p:Version="${{ env.version }}"
33+
34+
- name: dotnet test
35+
run: dotnet test --configuration Release --no-build --collect:"XPlat Code Coverage" --results-directory ${{github.workspace}}/.build/coverage
36+
37+
- name: ReportGenerator
38+
uses: danielpalme/ReportGenerator-GitHub-Action@5.4.8
39+
with:
40+
reports: ${{github.workspace}}/.build/coverage/**/coverage.cobertura.xml
41+
targetdir: ${{github.workspace}}/.build/coveragereport/
42+
reporttypes: Html;MarkdownSummaryGithub
43+
title: 'Code Coverage'
44+
45+
- name: Write PR Number
46+
if: ${{ github.event_name == 'pull_request' }}
47+
run: |
48+
New-Item -Type File -Value "${{ github.event.number }}" -Force -Path "${{github.workspace}}/.build/coveragereport/PullRequestNumber"
49+
50+
- name: Upload Code Coverage Report
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: CodeCoverage
54+
path: ${{github.workspace}}/.build/coveragereport/
55+
if-no-files-found: error
56+
57+
- name: dotnet publish
58+
if: ${{ github.event_name != 'pull_request' }}
59+
run: |
60+
# If publishing single file, remove the --no-build below
61+
dotnet publish --configuration Release --no-build -p:Version="${{ env.version }}" -p:PublishDir=${{github.workspace}}/.build/publish
62+
63+
- name: Upload artifact for deployment job
64+
if: ${{ github.event_name != 'pull_request' }}
65+
uses: actions/upload-artifact@v4
66+
with:
67+
name: app
68+
path: ${{github.workspace}}/.build/publish
69+
70+
# This will automatically mark PRs from dependabot with auto merge.
71+
# This allows them to automatically complete if they pass the rest of the CI
72+
auto-merge:
73+
if: ${{ github.event_name == 'pull_request' }}
74+
runs-on: ubuntu-latest
75+
76+
permissions:
77+
pull-requests: write
78+
contents: write
79+
80+
steps:
81+
- uses: fastify/github-action-merge-dependabot@v3.11.1
82+
with:
83+
# For GitHub Auto Merge to work it must be enabled on the repo.
84+
# This can be done with the script here:
85+
# https://github.com/Keboo/DotnetTemplates/blob/main/SetupRepo.ps1
86+
# See documentation here:
87+
# https://docs.github.com/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request
88+
use-github-auto-merge: true
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Code Coverage PR Comment
2+
3+
on:
4+
workflow_run:
5+
workflows: [Build SenNotes]
6+
types:
7+
- completed
8+
9+
defaults:
10+
run:
11+
shell: pwsh
12+
13+
# This is required by marocchino/sticky-pull-request-comment
14+
# You must enable read/write permissions to allow workflows to create comments on the PR.
15+
# On your repo navigate to: Settings > Actions > General > Workflow permissions, and make sure to enable read and write permissions.
16+
# https://github.com/marocchino/sticky-pull-request-comment#error-resource-not-accessible-by-integration
17+
permissions:
18+
pull-requests: write
19+
20+
jobs:
21+
post-code-coverage:
22+
runs-on: ubuntu-latest
23+
if: >
24+
github.event.workflow_run.event == 'pull_request' &&
25+
github.event.workflow_run.conclusion == 'success'
26+
steps:
27+
- name: Download artifacts
28+
run: gh run download ${{ github.event.workflow_run.id }} -n CodeCoverage --repo ${{ github.repository }}
29+
env:
30+
GH_TOKEN: ${{ github.token }}
31+
32+
- name: 'Get PR Number'
33+
id: get-pr-number
34+
run: |
35+
$pr_number = (cat PullRequestNumber)
36+
"pr_number=$pr_number" >> $env:GITHUB_OUTPUT
37+
38+
- uses: marocchino/sticky-pull-request-comment@v2
39+
with:
40+
recreate: true
41+
number: ${{ steps.get-pr-number.outputs.pr_number }}
42+
path: SummaryGithub.md

0 commit comments

Comments
 (0)