diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8c54e07..5c8f17f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,16 +48,16 @@ jobs: - name: Lint uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8 with: - version: v2.3.1 + version: v2.4.0 - name: Test - run: go test -v ./... + run: make test - name: Fuzz Test run: go test -fuzz=FuzzCalculateFileChunks -fuzztime=10s ./util - name: Build - run: go build . + run: make build - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@76621b61decf072c1cee8dd1ce2d2a82d33c17ed # v3 @@ -117,6 +117,7 @@ jobs: - name: Build env: CGO_ENABLED: '0' + GOEXPERIMENT: 'jsonv2' GOOS: ${{ matrix.os }} GOARCH: ${{ matrix.arch }} run: go build . diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a1a89e2 --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ +lint: + golangci-lint run + +test: + GOEXPERIMENT=jsonv2 go test ./... + +build: + GOEXPERIMENT=jsonv2 go build . + +.PHONY: lint test build diff --git a/fhir/client_test.go b/fhir/client_test.go index 86d90e0..e81cb8b 100644 --- a/fhir/client_test.go +++ b/fhir/client_test.go @@ -494,7 +494,7 @@ func TestPollAsyncStatus(t *testing.T) { _, err := pollAsyncStatus(server) - assert.Equal(t, "error while reading the outcome of an error response in the async response bundle: json: cannot unmarshal array into Go value of type fhir.OperationOutcome", err.Error()) + assert.Equal(t, "error while reading the outcome of an error response in the async response bundle: json: cannot unmarshal JSON array into Go type fhir.OperationOutcome", err.Error()) }) t.Run("async response with error bundle entry with outcome", func(t *testing.T) { diff --git a/go.mod b/go.mod index 5323252..404cb31 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,8 @@ module github.com/samply/blazectl -go 1.24 +go 1.25 -toolchain go1.24.6 +toolchain go1.25.0 require ( github.com/goccy/go-yaml v1.18.0