Skip to content

Commit ad9aba7

Browse files
committed
If I've C&P'd correctly, this should build on GitHub
1 parent 9445237 commit ad9aba7

File tree

3 files changed

+121
-0
lines changed

3 files changed

+121
-0
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "nuget"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: Build .NET Core application
2+
on:
3+
pull_request:
4+
types: [ opened, synchronize, reopened ]
5+
push:
6+
branches:
7+
- main
8+
env:
9+
AZURE_WEBAPP_NAME: astar-dev
10+
AZURE_WEBAPP_PACKAGE_PATH: src/uis/AStar.Dev.Web/published
11+
CONFIGURATION: Release
12+
DOTNET_CORE_VERSION: 9.0.x
13+
WORKING_DIRECTORY: src/uis/AStar.Dev.Web
14+
jobs:
15+
build:
16+
runs-on: windows-latest
17+
permissions:
18+
contents: read #This is required for actions/checkout
19+
20+
steps:
21+
- name: Set up JDK 17
22+
uses: actions/setup-java@v4
23+
with:
24+
java-version: 17
25+
distribution: 'zulu'
26+
27+
- uses: actions/checkout@v4
28+
with:
29+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
30+
31+
- name: 🛠 Cache SonarQube Cloud packages
32+
uses: actions/cache@v4
33+
with:
34+
path: ~\sonar\cache
35+
key: ${{ runner.os }}-sonar
36+
restore-keys: ${{ runner.os }}-sonar
37+
38+
- name: 🛠 Cache SonarQube Cloud scanner
39+
id: cache-sonar-scanner
40+
uses: actions/cache@v4
41+
with:
42+
path: .\.sonar\scanner
43+
key: ${{ runner.os }}-sonar-scanner
44+
restore-keys: ${{ runner.os }}-sonar-scanner
45+
46+
- name: 🛠 Install SonarQube Cloud scanner
47+
if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
48+
shell: powershell
49+
run: |
50+
New-Item -Path .\.sonar\scanner -ItemType Directory
51+
dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner
52+
53+
- name: 🔍 Restore, 🛠 Build and 🧪 Test with ☁️ SonarCloud / Qube
54+
env:
55+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
56+
shell: powershell
57+
run: |
58+
dotnet tool install --global dotnet-coverage
59+
.\.sonar\scanner\dotnet-sonarscanner begin /k:"astar-development_astar-dev-database-testing" /o:"astar-development" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.scanner.scanAll=false /d:sonar.scanner.skipJreProvisioning=true
60+
dotnet build
61+
dotnet-coverage collect 'dotnet test --filter "FullyQualifiedName!~Tests.EndToEnd"' -f xml -o 'coverage.xml'
62+
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
63+
#
64+
# - name: 🚀 Publish App
65+
# run: dotnet publish "${{ env.WORKING_DIRECTORY }}" --configuration ${{ env.CONFIGURATION }} --no-build --output "${{ env.AZURE_WEBAPP_PACKAGE_PATH }}"
66+
#
67+
# - name: 🚀 Publish Artifacts
68+
# uses: actions/upload-artifact@v4
69+
# with:
70+
# name: webapp
71+
# path: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}
72+
73+
# deploy:
74+
# runs-on: ubuntu-latest
75+
# needs: build
76+
# environment:
77+
# name: 'Production'
78+
# url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
79+
# permissions:
80+
# id-token: write #This is required for requesting the JWT
81+
# contents: read #This is required for actions/checkout
82+
#
83+
# steps:
84+
# - name: Download artifact from build job
85+
# uses: actions/download-artifact@v4
86+
# with:
87+
# name: webapp
88+
# path: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}
89+
#
90+
# - name: Login to Azure
91+
# uses: azure/login@v2
92+
# with:
93+
# client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_E8497C9E217E4655814D0F7761AAE04F }}
94+
# tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_085200BD39F041C4999EEB0851E8D6A2 }}
95+
# subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_3FEB324333C140D8A0FA99AC083AEB82 }}
96+
#
97+
# - name: Deploy to Azure WebApp
98+
# uses: azure/webapps-deploy@v3
99+
# with:
100+
# app-name: ${{ env.AZURE_WEBAPP_NAME }}
101+
# package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}

DatabaseTesting.sln

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
2424
.editorconfig = .editorconfig
2525
EndProjectSection
2626
EndProject
27+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{EB916946-4AEB-4F7A-B6AF-E270D6574EC0}"
28+
ProjectSection(SolutionItems) = preProject
29+
.github\dependabot.yml = .github\dependabot.yml
30+
EndProjectSection
31+
EndProject
32+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{1B8EF033-F575-495D-BC9C-D0539E66EC28}"
33+
ProjectSection(SolutionItems) = preProject
34+
.github\workflows\main_astar-dev.yml = .github\workflows\main_astar-dev.yml
35+
EndProjectSection
36+
EndProject
2737
Global
2838
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2939
Debug|Any CPU = Debug|Any CPU
@@ -69,4 +79,8 @@ Global
6979
GlobalSection(ExtensibilityGlobals) = postSolution
7080
SolutionGuid = {7F8498D7-2757-4147-B9D5-02595469FE7A}
7181
EndGlobalSection
82+
GlobalSection(NestedProjects) = preSolution
83+
{EB916946-4AEB-4F7A-B6AF-E270D6574EC0} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
84+
{1B8EF033-F575-495D-BC9C-D0539E66EC28} = {EB916946-4AEB-4F7A-B6AF-E270D6574EC0}
85+
EndGlobalSection
7286
EndGlobal

0 commit comments

Comments
 (0)