Skip to content

Commit 8f1dc99

Browse files
committed
Add Geocoding.slnx and Directory.Build.props, xunit v3
- Add modern XML solution file (Geocoding.slnx) - Add Directory.Build.props with shared package metadata Fix CI package feed org references - GitHub Packages: chadly → exceptionless - Feedz: foundatio/foundatio → exceptionless/geocoding
1 parent c9e8778 commit 8f1dc99

19 files changed

Lines changed: 439 additions & 146 deletions

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
updates:
3+
4+
- package-ecosystem: nuget
5+
directory: "/"
6+
schedule:
7+
interval: weekly

.github/workflows/build.yml

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [main]
6+
tags: ['v*']
7+
pull_request:
8+
9+
permissions:
10+
contents: read
11+
12+
env:
13+
TERM: xterm
14+
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: true
15+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
16+
DOTNET_NOLOGO: true
17+
MSBUILDTERMINALLOGGER: auto
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
timeout-minutes: 30
23+
outputs:
24+
version: ${{ steps.version.outputs.version }}
25+
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v6
29+
with:
30+
fetch-depth: 0
31+
32+
- name: Setup .NET Core
33+
uses: actions/setup-dotnet@v5
34+
with:
35+
dotnet-version: |
36+
8.0.x
37+
9.0.x
38+
10.0.x
39+
40+
- name: Version
41+
id: version
42+
run: |
43+
dotnet tool install --global minver-cli --version 7.0.0
44+
version=$(minver --tag-prefix v)
45+
echo "version=$version" >> $GITHUB_OUTPUT
46+
echo "MINVERVERSIONOVERRIDE=$version" >> $GITHUB_ENV
47+
echo "### Version: $version" >> $GITHUB_STEP_SUMMARY
48+
49+
- name: NuGet Restore
50+
run: dotnet restore Geocoding.slnx
51+
52+
- name: Build
53+
run: dotnet build Geocoding.slnx --no-restore --configuration Release
54+
55+
- name: Run Tests
56+
run: dotnet test --project test/Geocoding.Tests/Geocoding.Tests.csproj --no-build --configuration Release
57+
58+
publish:
59+
if: github.event_name != 'pull_request'
60+
needs: build
61+
runs-on: ubuntu-latest
62+
timeout-minutes: 30
63+
permissions:
64+
contents: read
65+
packages: write
66+
67+
steps:
68+
- name: Checkout
69+
uses: actions/checkout@v6
70+
with:
71+
fetch-depth: 0
72+
73+
- name: Setup .NET Core
74+
uses: actions/setup-dotnet@v5
75+
with:
76+
dotnet-version: |
77+
8.0.x
78+
9.0.x
79+
10.0.x
80+
81+
- name: Set Version Override
82+
run: |
83+
echo "MINVERVERSIONOVERRIDE=${{ needs.build.outputs.version }}" >> $GITHUB_ENV
84+
echo "### Publish Version: ${{ needs.build.outputs.version }}" >> $GITHUB_STEP_SUMMARY
85+
86+
- name: NuGet Restore
87+
run: dotnet restore Geocoding.slnx
88+
89+
- name: Package
90+
run: dotnet pack Geocoding.slnx --no-restore --configuration Release
91+
92+
- name: Publish CI Packages
93+
if: github.actor != 'dependabot[bot]'
94+
run: |
95+
for package in $(find . -name "*.nupkg" | grep -v "minver"); do
96+
if [ -n "${{ secrets.GITHUB_TOKEN }}" ]; then
97+
dotnet nuget push "$package" --source https://nuget.pkg.github.com/exceptionless/index.json --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
98+
fi
99+
100+
if [ -n "${{ secrets.FEEDZ_KEY }}" ]; then
101+
dotnet nuget push "$package" --source https://f.feedz.io/exceptionless/geocoding/nuget --api-key ${{ secrets.FEEDZ_KEY }} --skip-duplicate
102+
fi
103+
done
104+
105+
- name: Publish Release Packages
106+
if: startsWith(github.ref, 'refs/tags/v')
107+
env:
108+
NUGET_KEY: ${{ secrets.NUGET_KEY }}
109+
run: |
110+
if [ -n "$NUGET_KEY" ]; then
111+
for package in $(find . -name "*.nupkg" | grep -v "minver"); do
112+
dotnet nuget push "$package" --source https://api.nuget.org/v3/index.json --api-key "$NUGET_KEY" --skip-duplicate
113+
done
114+
fi
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: "Code scanning - action"
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
schedule:
8+
- cron: '0 1 * * 2'
9+
10+
jobs:
11+
CodeQL-Build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v6
17+
with:
18+
fetch-depth: 2
19+
20+
- run: git checkout HEAD^2
21+
if: ${{ github.event_name == 'pull_request' }}
22+
23+
- name: Initialize CodeQL
24+
uses: github/codeql-action/init@v4
25+
with:
26+
languages: csharp
27+
28+
- name: Setup .NET
29+
uses: actions/setup-dotnet@v5
30+
with:
31+
dotnet-version: |
32+
8.0.x
33+
9.0.x
34+
10.0.x
35+
36+
- name: Restore
37+
run: dotnet restore Geocoding.slnx
38+
39+
- name: Build
40+
run: dotnet build Geocoding.slnx --no-restore --configuration Release
41+
42+
- name: Perform CodeQL Analysis
43+
uses: github/codeql-action/analyze@v4
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: "Copilot Setup"
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
paths:
7+
- .github/workflows/copilot-setup-steps.yml
8+
pull_request:
9+
paths:
10+
- .github/workflows/copilot-setup-steps.yml
11+
12+
jobs:
13+
copilot-setup-steps:
14+
runs-on: ubuntu-latest
15+
16+
permissions:
17+
contents: read
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v6
22+
with:
23+
fetch-depth: 0
24+
25+
- name: Setup .NET Core
26+
uses: actions/setup-dotnet@v5
27+
with:
28+
dotnet-version: |
29+
8.0.x
30+
9.0.x
31+
10.0.x
32+
33+
- name: NuGet Restore
34+
run: dotnet restore Geocoding.slnx

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ test/Geocoding.Tests/settings-override.json
66
.vs
77
/artifacts
88
project.lock.json
9+
.idea
910

1011
#################
1112
## Visual Studio
@@ -34,3 +35,4 @@ Thumbs.db
3435

3536
# Folder config file
3637
Desktop.ini
38+

.vscode/settings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"cSpell.words": [
3+
"chadly",
4+
"Geocoder"
5+
]
6+
}

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,10 @@ Before marking work complete, verify:
139139
dotnet test
140140

141141
# Specific test class
142-
dotnet test --filter "FullyQualifiedName~GoogleGeocoderTest"
142+
dotnet test --project test/Geocoding.Tests/Geocoding.Tests.csproj --filter-class Geocoding.Tests.GoogleBusinessKeyTest
143143

144144
# With logging
145-
dotnet test --logger "console;verbosity=detailed"
145+
dotnet test --project test/Geocoding.Tests/Geocoding.Tests.csproj --diagnostic --diagnostic-verbosity Trace
146146
```
147147

148148
Note: Most geocoder tests require valid API keys configured in `test/Geocoding.Tests/settings.json`.

Directory.Build.props

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<Project>
2+
<PropertyGroup>
3+
<Authors>chadly,Exceptionless</Authors>
4+
<Product>Geocoding.Net</Product>
5+
<Description>Generic C# Geocoding API - unified interface for geocoding and reverse geocoding across multiple providers.</Description>
6+
<PackageTags>geocoding;geocode;geocoder;maps;address;validation;normalization</PackageTags>
7+
<PackageProjectUrl>https://github.com/exceptionless/Geocoding.net</PackageProjectUrl>
8+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
9+
<PackageReleaseNotes>https://github.com/exceptionless/Geocoding.net/releases/latest</PackageReleaseNotes>
10+
<RepositoryUrl>https://github.com/exceptionless/Geocoding.net.git</RepositoryUrl>
11+
<RepositoryType>git</RepositoryType>
12+
<ImplicitUsings>enable</ImplicitUsings>
13+
<LangVersion>latest</LangVersion>
14+
</PropertyGroup>
15+
</Project>

Geocoding.sln

Lines changed: 0 additions & 73 deletions
This file was deleted.

Geocoding.slnx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<Solution>
2+
<Folder Name="/src/">
3+
<Project Path="src/Geocoding.Core/Geocoding.Core.csproj" />
4+
<Project Path="src/Geocoding.Google/Geocoding.Google.csproj" />
5+
<Project Path="src/Geocoding.Here/Geocoding.Here.csproj" />
6+
<Project Path="src/Geocoding.MapQuest/Geocoding.MapQuest.csproj" />
7+
<Project Path="src/Geocoding.Microsoft/Geocoding.Microsoft.csproj" />
8+
<Project Path="src/Geocoding.Yahoo/Geocoding.Yahoo.csproj" />
9+
</Folder>
10+
<Folder Name="/test/">
11+
<Project Path="test/Geocoding.Tests/Geocoding.Tests.csproj" />
12+
</Folder>
13+
</Solution>

0 commit comments

Comments
 (0)