Skip to content

Commit

Permalink
Upgrade codecov, fix currentProjectPath when running outside regular …
Browse files Browse the repository at this point in the history
…path (#149)

Signed-off-by: Ricardo Zanini <zanini@redhat.com>
  • Loading branch information
ricardozanini authored Mar 7, 2023
1 parent 8994e2b commit 7ee93e0
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/Go-SDK-PR-Check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,10 @@ jobs:
run: |
go test ./... -coverprofile test_coverage.out -covermode=atomic
- name: Upload results to codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
file: ./test_coverage.out
files: ./test_coverage.out
flags: sdk-go
name: sdk-go
fail_ci_if_error: true
verbose: true
2 changes: 1 addition & 1 deletion hack/boilerplate.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 The Serverless Workflow Specification Authors
// Copyright 2023 The Serverless Workflow Specification Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion model/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion test/path.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"os"
"path/filepath"
"runtime"
"strings"

"github.com/pkg/errors"
)
Expand Down Expand Up @@ -49,5 +50,9 @@ func CurrentProjectPath() string {

func currentFilePath() string {
_, file, _, _ := runtime.Caller(1)
return file
if strings.HasSuffix(file, "/") {
return file
}
println("Returning an empty string for currentFilePath since it's not a caller path: " + file)
return ""
}
4 changes: 2 additions & 2 deletions tools.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/serverlessworkflow/sdk-go
module github.com/serverlessworkflow/sdk-go/v2

go 1.14
go 1.19

require (
github.com/google/addlicense v0.0.0-20210428195630-6d92264d7170 // indirect
Expand Down

0 comments on commit 7ee93e0

Please sign in to comment.