Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
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
51 changes: 47 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# DO NOT EDIT: root convention
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
# END DO NOT EDIT

[*.fsd]
indent_size = 4
Expand All @@ -27,10 +26,43 @@ insert_final_newline = false
[dotnet-tools.json]
insert_final_newline = false

[*.cs]
# DO NOT EDIT: json convention
[*.json]
indent_size = 2
indent_style = space
# END DO NOT EDIT

# DO NOT EDIT: md convention
[*.md]
indent_size = 2
indent_style = space
insert_final_newline = true
# END DO NOT EDIT

# DO NOT EDIT: ps1 convention
[*.ps1]
indent_size = tab
indent_style = tab
insert_final_newline = true
# END DO NOT EDIT

# DO NOT EDIT: yaml convention
[*.{yml,yaml}]
indent_size = 2
indent_style = space
# END DO NOT EDIT

# DO NOT EDIT: csharp convention
# generated from https://github.com/Faithlife/CodingGuidelines/blob/master/sections/csharp/editorconfig.md
[*.{csproj,props,slnx,targets}]
indent_size = 2
indent_style = space

[*.{cs,cshtml,razor}]
indent_size = tab
indent_style = tab
tab_width = 4
insert_final_newline = true
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents = true
Expand Down Expand Up @@ -130,6 +162,8 @@ dotnet_diagnostic.CA1819.severity = suggestion
dotnet_diagnostic.CA1822.severity = suggestion
dotnet_diagnostic.CA1826.severity = suggestion
dotnet_diagnostic.CA1848.severity = suggestion
dotnet_diagnostic.CA1861.severity = suggestion
dotnet_diagnostic.CA1873.severity = suggestion
dotnet_diagnostic.CA2000.severity = none
dotnet_diagnostic.CA2227.severity = none
dotnet_diagnostic.CA2234.severity = none
Expand Down Expand Up @@ -212,7 +246,15 @@ dotnet_diagnostic.IDE0161.severity = suggestion
dotnet_diagnostic.IDE0170.severity = suggestion
dotnet_diagnostic.IDE0180.severity = warning
dotnet_diagnostic.IDE0290.severity = suggestion
dotnet_diagnostic.IDE0300.severity = suggestion
dotnet_diagnostic.IDE0301.severity = suggestion
dotnet_diagnostic.IDE0305.severity = suggestion
dotnet_diagnostic.IDE0306.severity = suggestion
dotnet_diagnostic.IDE0370.severity = suggestion
dotnet_diagnostic.IDE0390.severity = suggestion
dotnet_diagnostic.IDE0391.severity = suggestion
dotnet_diagnostic.IDE1005.severity = suggestion
dotnet_diagnostic.NUnit2045.severity = suggestion
dotnet_diagnostic.SA0001.severity = none
dotnet_diagnostic.SA1003.severity = none
dotnet_diagnostic.SA1008.severity = none
Expand Down Expand Up @@ -380,3 +422,4 @@ resharper_unused_auto_property_accessor_global_highlighting = none
resharper_unused_auto_property_accessor_local_highlighting = suggestion
resharper_unused_member_global_highlighting = none
resharper_unused_member_local_highlighting = suggestion
# END DO NOT EDIT
8 changes: 4 additions & 4 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
* text=auto eol=lf

*.cs text diff=csharp
*.csproj text merge=union
*.sln text merge=union

*.g.cs linguist-generated=true

# DO NOT EDIT: csharp convention
*.cs text diff=csharp
# END DO NOT EDIT
7 changes: 7 additions & 0 deletions .github/conventions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
conventions:
- path: FacilityApi/Facility/conventions/facility-dotnet-package
- path: FacilityApi/Facility/conventions/facility-dotnet-package-workflows

pull-request:
reviewers:
- ejball
19 changes: 19 additions & 0 deletions .github/lsp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"lspServers": {
"csharp": {
"command": "dnx",
"args": [
"--yes",
"--prerelease",
"roslyn-language-server",
"--",
"--stdio",
"--autoLoadProjects"
],
"fileExtensions": {
".cs": "csharp",
".cshtml": "csharp"
}
}
}
}
47 changes: 47 additions & 0 deletions .github/workflows/apply-repo-conventions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Apply Repository Conventions

on:
schedule:
- cron: '31 9 * * 1-5'
workflow_dispatch:

permissions: {}

jobs:
apply:
name: Apply
runs-on: ubuntu-latest
steps:
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@v3
with:
client-id: ${{ vars.FACILITY_BOT_CLIENT_ID }}
private-key: ${{ secrets.FACILITY_BOT_PRIVATE_KEY }}

- name: Check out repository
uses: actions/checkout@v6
with:
token: ${{ steps.app-token.outputs.token }}
# full history needed for git merge-base in repo-conventions tool
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "facility-bot[app]"
git config user.email "facility-bot[app]@users.noreply.github.com"

- name: Install .NET
uses: actions/setup-dotnet@v5

- name: Install APM
uses: microsoft/apm-action@v1
with:
setup-only: true

- name: Apply repository conventions
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
dnx -y repo-conventions apply --open-pr
53 changes: 0 additions & 53 deletions .github/workflows/build.yaml

This file was deleted.

82 changes: 82 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Continuous Integration

on:
push:
branches: [master]
tags-ignore: ['**']
pull_request:
workflow_dispatch:

env:
DOTNET_NOLOGO: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1

defaults:
run:
shell: pwsh

permissions:
contents: write

jobs:
build-matrix:
name: Build ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Check out code
uses: actions/checkout@v6
- name: Install .NET
uses: actions/setup-dotnet@v5
- name: Restore
run: ./build.ps1 restore
- name: Build
run: ./build.ps1 build --skip restore
- name: Test
run: ./build.ps1 test --skip build
- name: Package
run: ./build.ps1 package --skip test
- name: Upload packages
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v7
with:
name: nuget-packages
path: release/*.nupkg
if-no-files-found: error

build:
name: Build
runs-on: ubuntu-latest
needs: build-matrix
if: ${{ always() }}
steps:
- name: Build failed
if: ${{ needs.build-matrix.result != 'success' }}
run: Write-Host "Build failed."; exit 1
- name: Build succeeded
if: ${{ needs.build-matrix.result == 'success' }}
run: Write-Host "Build succeeded."

publish:
name: Publish
runs-on: windows-latest
needs: build
if: github.repository_owner == 'FacilityApi' && github.ref == 'refs/heads/master'
steps:
- name: Check out code
uses: actions/checkout@v6
- name: Install .NET
uses: actions/setup-dotnet@v5
- name: Download packages
uses: actions/download-artifact@v8
with:
name: nuget-packages
path: release
- name: Publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: ./build.ps1 publish --skip package --trigger publish-nuget-output
26 changes: 26 additions & 0 deletions .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Copilot Setup Steps

on:
workflow_dispatch:

env:
DOTNET_NOLOGO: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1

defaults:
run:
shell: pwsh

permissions:
contents: read

jobs:
copilot-setup-steps:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v6
- name: Install .NET
uses: actions/setup-dotnet@v5
- name: Restore
run: ./build.ps1 restore
39 changes: 39 additions & 0 deletions .github/workflows/npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: npm

on:
push:
branches: [master]
tags-ignore: ['**']
pull_request:
workflow_dispatch:

env:
DOTNET_NOLOGO: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1

defaults:
run:
shell: pwsh

jobs:
npm:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v6
- name: Install .NET
uses: actions/setup-dotnet@v5
- name: Install Node.js
uses: actions/setup-node@v6
with:
node-version: lts/*
registry-url: https://registry.npmjs.org
- name: Build npm package
run: ./build.ps1 build-npm
- name: Test npm package
run: ./build.ps1 test-npm --skip build-npm
- name: Publish npm package
if: github.repository_owner == 'FacilityApi' && github.ref == 'refs/heads/master'
env:
NPM_ACCESS_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
run: ./build.ps1 publish-npm --skip test-npm
Loading
Loading