Skip to content

Commit

Permalink
update workflow file for test
Browse files Browse the repository at this point in the history
  • Loading branch information
bimalkjha committed Aug 27, 2024
1 parent cd0860b commit 0b53bc6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ jobs:
echo "CGO_LDFLAGS=$cgo_ldflags" >> "$GITHUB_ENV"
echo "LD_LIBRARY_PATH=$ld_library_path" >> "$GITHUB_ENV"
# - name: Test
# env:
# DB2_CONNSTR: ${{ secrets.DB2_CONNSTR }}
# run: |
# pwd
# cd testdata
# echo "============TEST CASES ======"
# go test -v
- name: Test
env:
DB2_CONNSTR: ${{ secrets.DB2_CONNSTR }}
run: |
pwd
cd testdata
echo "============TEST CASES ======"
go test -v
1 change: 1 addition & 0 deletions testdata/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ func UpdateConnectionVariables() {

//Createconnection will return the db instance
func Createconnection() (db *sql.DB) {
var connStrFound bool
connStr, connStrFound = os.LookupEnv("DB2_CONNSTR")
if !connStrFound{
UpdateConnectionVariables()
Expand Down

0 comments on commit 0b53bc6

Please sign in to comment.