Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ version: 2
updates:
- package-ecosystem: nuget
directories:
- '**/*'
- "**/*"
schedule:
interval: daily
time: '14:00'
time: "14:00"
open-pull-requests-limit: 10
cooldown:
default-days: 7
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
time: '14:00'
time: "14:00"
cooldown:
default-days: 7
80 changes: 40 additions & 40 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,62 +3,62 @@ name: "Code scanning - action"
on:
push:
branches-ignore:
- 'dependabot/**'
- "dependabot/**"
pull_request:
schedule:
- cron: '0 1 * * 1'
- cron: "0 1 * * 1"

jobs:
CodeQL-Build:

runs-on: ubuntu-latest

permissions:
security-events: write

steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
persist-credentials: false
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
persist-credentials: false

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

- name: Setup .NET
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0
with:
dotnet-version: |
8.0.x
9.0.x
- name: Setup .NET
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0
with:
dotnet-version: |
8.0.x
9.0.x
10.0.x

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3
29 changes: 29 additions & 0 deletions .github/workflows/precious.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: precious

on:
push:
pull_request:
schedule:
- cron: "5 5 * * SUN"

permissions: {}

jobs:
precious:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup mise
uses: jdx/mise-action@6d1e696aa24c1aa1bcc1adea0212707c71ab78a8 # v3.6.1
with:
cache: true
env:
# Multiple dotnet SDKs share a single dotnet-root. Parallel
# installs race on the shared binary, causing verification
# failures (exit code 150).
MISE_JOBS: "1"
- name: Run precious lint
run: precious lint --all
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ jobs:
- name: Run tests
run: dotnet test -c Release
env:
MAXMIND_TEST_BASE_DIR: ${{ github.workspace }}/MaxMind.GeoIP2.UnitTests
MAXMIND_TEST_BASE_DIR:
${{ github.workspace }}/MaxMind.GeoIP2.UnitTests

- name: Pack
run: dotnet pack -c Release MaxMind.GeoIP2/MaxMind.GeoIP2.csproj
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
push:
pull_request:
schedule:
- cron: '3 20 * * SUN'
- cron: "3 20 * * SUN"

permissions: {}

Expand Down Expand Up @@ -32,11 +32,16 @@ jobs:
run: dotnet build

- name: Run benchmark
run: dotnet run -f net8.0 -p MaxMind.GeoIP2.Benchmark/MaxMind.GeoIP2.Benchmark.csproj
run:
dotnet run -f net8.0 -p
MaxMind.GeoIP2.Benchmark/MaxMind.GeoIP2.Benchmark.csproj
env:
MAXMIND_BENCHMARK_DB: ${{ github.workspace }}/MaxMind.GeoIP2.UnitTests/TestData/MaxMind-DB/test-data/GeoIP2-City-Test.mmdb
MAXMIND_BENCHMARK_DB:
${{ github.workspace
}}/MaxMind.GeoIP2.UnitTests/TestData/MaxMind-DB/test-data/GeoIP2-City-Test.mmdb

- name: Run tests
run: dotnet test
env:
MAXMIND_TEST_BASE_DIR: ${{ github.workspace }}/MaxMind.GeoIP2.UnitTests
MAXMIND_TEST_BASE_DIR:
${{ github.workspace }}/MaxMind.GeoIP2.UnitTests
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ ipch/

# ReSharper is a .NET coding add-in
_ReSharper*
*.DotSettings

# NCrunch
*.ncrunch*
Expand Down Expand Up @@ -103,6 +104,12 @@ AppPackages/
.idea
*.iml

# Build logs
*.binlog

# BenchmarkDotNet
BenchmarkDotNet.Artifacts/

# Claude
.claude

Expand All @@ -126,3 +133,6 @@ Generated_Code #added for RIA/Silverlight projects
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML

# Worktrees
.worktrees
32 changes: 32 additions & 0 deletions .precious.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
exclude = [
".git",
"MaxMind.GeoIP2.UnitTests/TestData/MaxMind-DB/**",
"BenchmarkDotNet.Artifacts/**",
]

[commands.prettier-markdown]
type = "both"
cmd = ["prettier", "--prose-wrap", "always"]
lint-flags = ["--check"]
tidy-flags = ["--write"]
path-args = "absolute-file"
include = "**/*.md"
ok-exit-codes = 0

[commands.prettier-json]
type = "both"
cmd = ["prettier"]
lint-flags = ["--check"]
tidy-flags = ["--write"]
path-args = "absolute-file"
include = "**/*.json"
ok-exit-codes = 0

[commands.prettier-yaml]
type = "both"
cmd = ["prettier"]
lint-flags = ["--check"]
tidy-flags = ["--write"]
path-args = "absolute-file"
include = ["**/*.yml", "**/*.yaml"]
ok-exit-codes = 0
6 changes: 6 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"proseWrap": "always",
"printWidth": 80,
"tabWidth": 2,
"useTabs": false
}
Loading
Loading