Skip to content

Commit e30c387

Browse files
authored
286 dockter 1 (#292)
* 286 Update dependencies * #286 Savepoint * #286 Update dependencies * #286 Working testcases * #286 Working inter * #286 Prepare for versioned release * #286 Prepare for versioned release * #286 Prepare for versioned release * #286 Fix test issues * #286 Fix test issues * #286 Fix test issues - 3
1 parent 5604c65 commit e30c387

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1723
-1112
lines changed

.github/linters/.golangci.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
run:
2+
modules-download-mode: readonly
3+
show-stats: true
4+
5+
output:
6+
print-linter-name: false
7+
sort-results: true
8+
9+
linters:
10+
enable:
11+
# List generated from: https://golangci-lint.run/usage/linters/
12+
# We are enabling all defaults as well as any bug/security related
13+
- asasalint
14+
- asciicheck
15+
- bidichk
16+
- bodyclose
17+
- contextcheck
18+
- durationcheck
19+
- errcheck
20+
- errchkjson
21+
- errorlint
22+
- exhaustive
23+
- exportloopref
24+
- gocheckcompilerdirectives
25+
- gochecksumtype
26+
- gocritic
27+
- gofmt
28+
- gosec
29+
- gosimple
30+
- gosmopolitan
31+
- govet
32+
- ineffassign
33+
- loggercheck
34+
- makezero
35+
- musttag
36+
- nilerr
37+
- noctx
38+
- protogetter
39+
- reassign
40+
- revive
41+
- rowserrcheck
42+
- spancheck
43+
- sqlclosecheck
44+
- staticcheck
45+
- testifylint
46+
- unused
47+
- zerologlint

.github/linters/.jscpd.json

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
{
2+
"ignore": [
3+
"**/*.go,**/go-test*.yaml"
4+
],
25
"threshold": 13
36
}

.github/workflows/go-test-darwin.yaml.disabled

+16-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
name: go test darwin
22

3-
on: [push]
3+
on: [pull_request, workflow_dispatch]
44

55
env:
66
DYLD_LIBRARY_PATH: /opt/senzing/g2/lib:/opt/senzing/g2/lib/macos
77
LD_LIBRARY_PATH: /opt/senzing/g2/lib:/opt/senzing/g2/lib/macos
8-
SENZING_TOOLS_DATABASE_URL: sqlite3://na:na@/tmp/sqlite/G2C.db
8+
SENZING_LOG_LEVEL: TRACE
9+
SENZING_TOOLS_DATABASE_URL: sqlite3://na:na@nowhere/tmp/sqlite/G2C.db
910

1011
permissions:
1112
contents: read
@@ -17,7 +18,7 @@ jobs:
1718
strategy:
1819
matrix:
1920
go: ["1.21"]
20-
os: [macos-latest]
21+
os: [macos-13]
2122
senzingapi-version: [staging-v4]
2223

2324
steps:
@@ -43,4 +44,15 @@ jobs:
4344
run: mkdir /tmp/sqlite && cp testdata/sqlite/G2C.db /tmp/sqlite/G2C.db
4445

4546
- name: run go test
46-
run: go test -exec /Users/runner/work/serve-grpc/serve-grpc/bin/macos_exec_dyld.sh -v -p 1 ./...
47+
run: go test -exec /Users/runner/work/serve-grpc/serve-grpc/bin/macos_exec_dyld.sh -v -p 1 -coverprofile=./cover.out -covermode=atomic -coverpkg=./... ./...
48+
49+
- name: Store coverage file
50+
uses: actions/upload-artifact@v4
51+
with:
52+
name: cover.out
53+
path: ./cover.out
54+
55+
coverage:
56+
name: coverage
57+
needs: go-test-darwin
58+
uses: senzing-factory/build-resources/.github/workflows/go-coverage.yaml@v2

.github/workflows/go-test-linux.yaml

+27-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on: [push]
44

55
env:
66
LD_LIBRARY_PATH: /opt/senzing/g2/lib
7+
SENZING_LOG_LEVEL: TRACE
78
SENZING_TOOLS_DATABASE_URL: sqlite3://na:na@/tmp/sqlite/G2C.db
89

910
permissions:
@@ -30,16 +31,40 @@ jobs:
3031
with:
3132
go-version: ${{ matrix.go }}
3233

33-
- name: install Senzing API Runtime
34+
- name: install Senzing API
3435
uses: senzing-factory/github-action-install-senzing-api@v3
3536
with:
3637
senzingapi-runtime-version: ${{ matrix.senzingapi-version }}
3738

39+
- name: Set up gotestfmt
40+
uses: gotesttools/gotestfmt-action@v2
41+
with:
42+
token: ${{ secrets.GITHUB_TOKEN }}
43+
3844
- name: copy /etc files
3945
run: sudo cp testdata/senzing-license/g2.lic /etc/opt/senzing/g2.lic
4046

4147
- name: copy test database files
4248
run: mkdir /tmp/sqlite && cp testdata/sqlite/G2C.db /tmp/sqlite/G2C.db
4349

4450
- name: run go test
45-
run: go test -v -p 1 ./...
51+
run: go test -json -v -p 1 -coverprofile=./cover.out -covermode=atomic -coverpkg=./... ./... 2>&1 | tee /tmp/gotest.log | gotestfmt
52+
53+
- name: Store coverage file
54+
uses: actions/upload-artifact@v4
55+
with:
56+
name: cover.out
57+
path: ./cover.out
58+
59+
- name: Upload test log
60+
uses: actions/upload-artifact@v2
61+
if: always()
62+
with:
63+
name: test-log
64+
path: /tmp/gotest.log
65+
if-no-files-found: error
66+
67+
coverage:
68+
name: coverage
69+
needs: go-test-linux
70+
uses: senzing-factory/build-resources/.github/workflows/go-coverage.yaml@v2

.github/workflows/go-test-windows.yaml

+17-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
name: go test windows
22

3-
on: [push]
3+
on: [pull_request, workflow_dispatch]
44

55
env:
6-
SENZING_TOOLS_DATABASE_URL: sqlite3://na:na@nowhere/C:\Temp\sqlite\G2C.db
6+
SENZING_LOG_LEVEL: TRACE
7+
SENZING_TOOLS_DATABASE_URL: "sqlite3://na:na@nowhere/C:\\Temp\\sqlite\\G2C.db"
78

89
permissions:
910
contents: read
@@ -44,4 +45,17 @@ jobs:
4445
run: mkdir "C:\Temp\sqlite" && copy testdata/sqlite/G2C.db "C:\Temp\sqlite\G2C.db"
4546

4647
- name: run go test
47-
run: go test -v -p 1 ./...
48+
run: |
49+
go test -v -p 1 -coverprofile=cover -covermode=atomic -coverpkg=./... ./...
50+
cp cover cover.out
51+
52+
- name: Store coverage file
53+
uses: actions/upload-artifact@v4
54+
with:
55+
name: cover.out
56+
path: cover.out
57+
58+
coverage:
59+
name: coverage
60+
needs: go-test-windows
61+
uses: senzing-factory/build-resources/.github/workflows/go-coverage.yaml@v2

.github/workflows/gofmt.yaml

-12
This file was deleted.

.github/workflows/golangci-lint.yaml

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: golangci-lint
2+
3+
on:
4+
push:
5+
branches-ignore: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
permissions:
10+
# Required: allow read access to the content for analysis.
11+
contents: read
12+
# Optional: allow read access to pull request. Use with `only-new-issues` option.
13+
pull-requests: read
14+
15+
jobs:
16+
golangci:
17+
name: lint
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: checkout repository
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Install Senzing API
27+
uses: senzing-factory/github-action-install-senzing-api@v3
28+
with:
29+
senzingapi-runtime-version: staging-v4
30+
31+
- name: Copy Senzing headers
32+
run: |
33+
mkdir --parents ./szconfig/gohelpers
34+
cp /opt/senzing/g2/sdk/c/*.h ./szconfig/
35+
cp /opt/senzing/g2/sdk/c/gohelpers/*.h ./szconfig/gohelpers
36+
mkdir --parents ./szconfigmanager/gohelpers
37+
cp /opt/senzing/g2/sdk/c/*.h ./szconfigmanager/
38+
cp /opt/senzing/g2/sdk/c/gohelpers/*.h ./szconfigmanager/gohelpers
39+
mkdir --parents ./szdiagnostic/gohelpers
40+
cp /opt/senzing/g2/sdk/c/*.h ./szdiagnostic/
41+
cp /opt/senzing/g2/sdk/c/gohelpers/*.h ./szdiagnostic/gohelpers
42+
mkdir --parents ./szengine/gohelpers
43+
cp /opt/senzing/g2/sdk/c/*.h ./szengine/
44+
cp /opt/senzing/g2/sdk/c/gohelpers/*.h ./szengine/gohelpers
45+
mkdir --parents ./szproduct/gohelpers
46+
cp /opt/senzing/g2/sdk/c/*.h ./szproduct/
47+
cp /opt/senzing/g2/sdk/c/gohelpers/*.h ./szproduct/gohelpers
48+
49+
- name: setup go
50+
uses: actions/setup-go@v5
51+
with:
52+
go-version: 1.21
53+
54+
- name: golangci-lint
55+
uses: golangci/golangci-lint-action@v6
56+
with:
57+
args: --config=${{ github.workspace }}/.github/linters/.golangci.yml
58+
only-new-issues: false
59+
version: latest

.github/workflows/gosec.yaml

-27
This file was deleted.

.github/workflows/make-go-github-file.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ permissions:
1212
jobs:
1313
make-go-github-file:
1414
secrets:
15-
SENZING_GITHUB_GPG_PRIVATE_KEY: ${{ secrets.SENZING_GITHUB_GPG_PRIVATE_KEY }}
16-
SENZING_GITHUB_GPG_PASSPHRASE: ${{ secrets.SENZING_GITHUB_GPG_PASSPHRASE }}
1715
SENZING_GITHUB_ACTOR: ${{ secrets.SENZING_GITHUB_ACTOR }}
16+
SENZING_GITHUB_GPG_PASSPHRASE: ${{ secrets.SENZING_GITHUB_GPG_PASSPHRASE }}
17+
SENZING_GITHUB_GPG_PRIVATE_KEY: ${{ secrets.SENZING_GITHUB_GPG_PRIVATE_KEY }}
1818
uses: senzing-factory/build-resources/.github/workflows/make-go-github-file.yaml@v2

.testcoverage.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# (mandatory)
2+
# Path to coverprofile file (output of `go test -coverprofile` command).
3+
#
4+
# For cases where there are many coverage profiles, such as when running
5+
# unit tests and integration tests separately, you can combine all those
6+
# profiles into one. In this case, the profile should have a comma-separated list
7+
# of profile files, e.g., 'cover_unit.out,cover_integration.out'.
8+
profile: cover.out
9+
10+
# (optional; but recommended to set)
11+
# When specified reported file paths will not contain local prefix in the output
12+
local-prefix: "github.com/org/project"
13+
14+
# Holds coverage thresholds percentages, values should be in range [0-100]
15+
threshold:
16+
# (optional; default 0)
17+
# The minimum coverage that each file should have
18+
file: 70
19+
20+
# (optional; default 0)
21+
# The minimum coverage that each package should have
22+
package: 70
23+
24+
# (optional; default 0)
25+
# The minimum total coverage project should have
26+
total: 70
27+
# Holds regexp rules which will override thresholds for matched files or packages
28+
# using their paths.
29+
#
30+
# First rule from this list that matches file or package is going to apply
31+
# new threshold to it. If project has multiple rules that match same path,
32+
# override rules should be listed in order from specific to more general rules.
33+
#override:
34+
# Increase coverage threshold to 100% for `foo` package
35+
# (default is 80, as configured above in this example)
36+
#- threshold: 100
37+
# path: ^pkg/lib/foo$
38+
39+
# Holds regexp rules which will exclude matched files or packages
40+
# from coverage statistics
41+
#exclude:
42+
# Exclude files or packages matching their paths
43+
#paths:
44+
# - \.pb\.go$ # excludes all protobuf generated files
45+
# - ^pkg/bar # exclude package `pkg/bar`
46+
47+
# NOTES:
48+
# - symbol `/` in all path regexps will be replaced by current OS file path separator
49+
# to properly work on Windows

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010

1111
-
1212

13+
## [0.7.3] - 2024-06-17
14+
15+
### Changed in 0.7.3
16+
17+
- Update methods to Senzing 4.0.0-24162
18+
- From `GrpcServerImpl` to `BasicGrpcServer`
19+
1320
## [0.7.2] - 2024-05-08
1421

1522
### Added in 0.7.2

0 commit comments

Comments
 (0)