From 6695503b6838302dde7da44c39ad4a840b65b883 Mon Sep 17 00:00:00 2001 From: Zhangbaowen-Hashdata Date: Mon, 11 Dec 2023 11:26:38 +0800 Subject: [PATCH] Update build_and_unit_test.yml Automate compilation and testing by modifying workflow files. Save time, reduce errors, and ensure consistent results. --- .github/workflows/build_and_unit_test.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build_and_unit_test.yml b/.github/workflows/build_and_unit_test.yml index 3d37f64..7472860 100644 --- a/.github/workflows/build_and_unit_test.yml +++ b/.github/workflows/build_and_unit_test.yml @@ -1,10 +1,10 @@ -name: build_and_unit_test +name: gpbackup_go_build_and_test on: push: - branches: [ master ] + branches: [ main ] pull_request: - branches: [ master ] + branches: [ main ] types: [ opened, synchronize, reopened, edited, ready_for_review ] jobs: @@ -15,12 +15,12 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 0 - path: go/src/github.com/cloudberrydb/gpbackup + path: go/pkg/mod/github.com/cloudberrydb/gpbackup - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.17 + go-version: 1.21.4 - name: Set Environment run: | @@ -29,15 +29,15 @@ jobs: - name: Dependencies run: | - cd ${GOPATH}/src/github.com/cloudberrydb/gpbackup + cd ${GOPATH}/pkg/mod/github.com/cloudberrydb/gpbackup make depend - name: Build run: | - cd ${GOPATH}/src/github.com/cloudberrydb/gpbackup + cd ${GOPATH}/pkg/mod/github.com/cloudberrydb/gpbackup make build - name: Unit Test run: | - cd ${GOPATH}/src/github.com/cloudberrydb/gpbackup - make unit_all_gpdb_versions + cd ${GOPATH}/pkg/mod/github.com/cloudberrydb/gpbackup + make test