Skip to content
Open
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
1 change: 1 addition & 0 deletions .env.tools
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export TOOLS_BUILDNUMBER=20250415.2
24 changes: 3 additions & 21 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,14 @@
# refer: https://github.com/dependabot/dependabot-core/blob/main/.github/dependabot.yml
version: 2
registries:
github-octocat:
type: git
url: https://github.com
username: x-access-token
password: ${{ secrets.DEPENDABOT_PAT }}

updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
registries:
- github-octocat
directory: "/"
schedule:
# Check for updates managed by Composer once a week
interval: "weekly"
day: "sunday"
time: "16:00"

# Maintain dependencies for Golang
- package-ecosystem: "gomod"
registries:
- github-octocat
directory: "eventsv1/"
schedule:
# Check for updates managed by Composer once a week
interval: "weekly"
day: "sunday"
time: "16:00"
day: "tuesday"
time: "03:01"
timezone: "Europe/London"

8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup go-task
uses: arduino/setup-task@v1
uses: arduino/setup-task@v2
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: '1.23.x'
go-version: '1.24.x'
token: ${{ secrets.GITHUB_TOKEN }}
cache-dependency-path: |
datatrails-common-api/go.sum
Expand All @@ -28,7 +28,7 @@ jobs:
go install golang.org/x/tools/cmd/goimports@v0.1.7
go install github.com/axw/gocov/gocov@v1.1.0
go install github.com/jstemmer/go-junit-report/v2@v2.1.0
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.60.3
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.64.2

- name: Code Quality
run: |
Expand Down
1 change: 1 addition & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ tasks:
cmds:
- task: codeqa:format
- task: codeqa:lint
- task: codeqa:vulncheck

build:
desc: ensure go build works for all packages
Expand Down
2 changes: 1 addition & 1 deletion eventsv1/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/datatrails/go-datatrails-serialization/eventsv1

go 1.23.0
go 1.24

require (
github.com/stretchr/testify v1.10.0
Expand Down
23 changes: 21 additions & 2 deletions eventsv1/test_results/main.out
Original file line number Diff line number Diff line change
@@ -1,2 +1,21 @@
mode: atomic
github.com/datatrails/go-datatrails-serialization/eventsv1/test.go:3.17,5.2 1 1
=== RUN Tesgithub.com/datatrails/go-datatrails-serialization/eventsv1/serializer.go:28.63,34.16 3 0
github.com/datatrails/go-datatrails-serialization/eventsv1/serializer.go:34.16,36.3 1 0
github.com/datatrails/go-datatrails-serialization/eventsv1/serializer.go:38.2,38.38 1 0
github.com/datatrails/go-datatrails-serialization/eventsv1/serializer.go:43.58,47.16 2 13
github.com/datatrails/go-datatrails-serialization/eventsv1/serializer.go:47.16,49.3 1 0
github.com/datatrails/go-datatrails-serialization/eventsv1/serializer.go:54.2,55.16 2 13
github.com/datatrails/go-datatrails-serialization/eventsv1/serializer.go:55.16,57.3 1 0
github.com/datatrails/go-datatrails-serialization/eventsv1/serializer.go:59.2,59.36 1 13
S: TestSerializeEventFromProtoConsistency/same_attributes_and_trails_in_same_order (0.00s)
--- PASS: TestSerializeEventFromProtoConsistency/same_attributes_and_trails_in_same_order_and_event_type (0.00s)
--- PASS: TestSerializeEventFromProtoConsistency/same_attributes_and_trails,_attributes_in_different_order (0.00s)
--- PASS: TestSerializeEventFromProtoConsistency/same_attributes_and_trails,_trails_in_different_order (0.00s)
--- PASS: TestSerializeEventFromProtoConsistency/same_trails_and_different_attributes_in_same_order (0.00s)
--- PASS: TestSerializeEventFromProtoConsistency/same_attributes_and_different_trails_in_same_order (0.00s)
=== RUN TestSerializableEvent_Serialize
=== RUN TestSerializableEvent_Serialize/all_attribute_types_no_error
--- PASS: TestSerializableEvent_Serialize (0.00s)
--- PASS: TestSerializableEvent_Serialize/all_attribute_types_no_error (0.00s)
PASS
coverage: 41.7% of statements
ok github.com/datatrails/go-datatrails-serialization/eventsv1 1.016s coverage: 41.7% of statements
14 changes: 14 additions & 0 deletions taskfiles/Taskfile_codeqa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,20 @@ tasks:
go vet ./...
golangci-lint {{.VERBOSE}} run --timeout 10m ./...

vulncheck:
desc: Vulnerability checks
dir: ../
vars:
GO_MOD_DIRS:
sh: find . -type f -name 'go.mod'
cmds:
- for: { var: GO_MOD_DIRS, as: MODULE}
cmd: |
NAME=$(basename $(dirname {{.MODULE}}))
echo "Vulncheck: $NAME"
cd $(dirname {{.MODULE}})
go run golang.org/x/vuln/cmd/govulncheck@latest -show verbose ./...

modules:
desc: Make all go.mod files consistent
dir: ../
Expand Down
4 changes: 2 additions & 2 deletions taskfiles/Taskfile_gotest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ tasks:
-v \
-coverprofile={{.UNITTEST_DIR}}/main.out \
./... \
2>&1
2>&1 | tee {{.UNITTEST_DIR}}/main.out

gocov convert {{.UNITTEST_DIR}}/main.out > {{.UNITTEST_DIR}}/coverage.json
# gocov convert {{.UNITTEST_DIR}}/main.out > {{.UNITTEST_DIR}}/coverage.json
Loading