Skip to content

Commit 7ee93e0

Browse files
Upgrade codecov, fix currentProjectPath when running outside regular path (#149)
Signed-off-by: Ricardo Zanini <zanini@redhat.com>
1 parent 8994e2b commit 7ee93e0

File tree

5 files changed

+13
-7
lines changed

5 files changed

+13
-7
lines changed

.github/workflows/Go-SDK-PR-Check.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,10 @@ jobs:
7878
run: |
7979
go test ./... -coverprofile test_coverage.out -covermode=atomic
8080
- name: Upload results to codecov
81-
uses: codecov/codecov-action@v1
81+
uses: codecov/codecov-action@v3
8282
with:
83-
file: ./test_coverage.out
83+
files: ./test_coverage.out
8484
flags: sdk-go
8585
name: sdk-go
8686
fail_ci_if_error: true
87+
verbose: true

hack/boilerplate.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2022 The Serverless Workflow Specification Authors
1+
// Copyright 2023 The Serverless Workflow Specification Authors
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

model/zz_generated.deepcopy.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/path.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import (
1818
"os"
1919
"path/filepath"
2020
"runtime"
21+
"strings"
2122

2223
"github.com/pkg/errors"
2324
)
@@ -49,5 +50,9 @@ func CurrentProjectPath() string {
4950

5051
func currentFilePath() string {
5152
_, file, _, _ := runtime.Caller(1)
52-
return file
53+
if strings.HasSuffix(file, "/") {
54+
return file
55+
}
56+
println("Returning an empty string for currentFilePath since it's not a caller path: " + file)
57+
return ""
5358
}

tools.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
module github.com/serverlessworkflow/sdk-go
1+
module github.com/serverlessworkflow/sdk-go/v2
22

3-
go 1.14
3+
go 1.19
44

55
require (
66
github.com/google/addlicense v0.0.0-20210428195630-6d92264d7170 // indirect

0 commit comments

Comments
 (0)