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: 2 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ concurrency:
cancel-in-progress: false

env:
MMDBVERIFY_VERSION: v1.0.0
RELEASE_TAG: geoip

jobs:
Expand Down Expand Up @@ -66,9 +65,8 @@ jobs:
- name: Verify both MMDB structures
run: |
set -euo pipefail
go install "github.com/maxmind/mmdbverify@${MMDBVERIFY_VERSION}"
"$(go env GOPATH)/bin/mmdbverify" -file output/Country.mmdb
"$(go env GOPATH)/bin/mmdbverify" -file output/GeoLite2-ASN.mmdb
go tool mmdbverify -file output/Country.mmdb
go tool mmdbverify -file output/GeoLite2-ASN.mmdb
- name: Verify independent content and rule semantics
run: |
set -euo pipefail
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/dependency-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
- run: python -m pip install -r requirements-ci.txt
- run: python -m unittest discover -s .github/scripts
- run: python -m unittest discover -s scripts -p "test_*.py"
- run: go tool mmdbverify -h
- run: go mod verify
- run: go test -race ./...
- run: go vet ./...
Expand Down
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ require (

require (
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/maxmind/mmdbverify v1.1.0 // indirect
github.com/spf13/pflag v1.0.10 // indirect
github.com/tidwall/match v1.2.0 // indirect
github.com/tidwall/pretty v1.2.2 // indirect
golang.org/x/sys v0.49.0 // indirect
)

tool github.com/maxmind/mmdbverify
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/maxmind/mmdbverify v1.1.0 h1:nvCr9FzgZ6u2dU3o1gtF4li262H6mcJUctNFvbjihv4=
github.com/maxmind/mmdbverify v1.1.0/go.mod h1:PyYz8/RcpqOOOjBgI9G0RnHf+SDYKqVwLN6KY+iWVNY=
github.com/maxmind/mmdbwriter v1.2.0 h1:hyvDopImmgvle3aR8AaddxXnT0iQH2KWJX3vNfkwzYM=
github.com/maxmind/mmdbwriter v1.2.0/go.mod h1:EQmKHhk2y9DRVvyNxwCLKC5FrkXZLx4snc5OlLY5XLE=
github.com/oschwald/geoip2-golang/v2 v2.5.0 h1:/t4eBuRbaaRXnZH4iQzuU+IevgJEH6XhBKhduWfjqiY=
Expand Down
2 changes: 1 addition & 1 deletion scripts/verify_mmdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def main() -> None:
try:
import maxminddb
except ImportError:
fail("缺少 maxminddb,请先 `pip install maxminddb==2.6.1`")
fail("缺少 maxminddb,请先 `pip install -r requirements-ci.txt`")

try:
db = maxminddb.open_database(path)
Expand Down
Loading