Skip to content

Commit 5736ac6

Browse files
committed
Update ci workflow
1 parent f5874a3 commit 5736ac6

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

.github/workflows/build_and_unit_test.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
fetch-depth: 0
2323

2424
- name: Set up Go
25-
uses: actions/setup-go@v4
25+
uses: actions/setup-go@v5
2626
with:
2727
go-version: ${{ env.GO_VERSION }}
2828
cache: true
@@ -55,7 +55,7 @@ jobs:
5555
path: go/src/github.com/apache/cloudberry-backup
5656

5757
- name: Set up Go
58-
uses: actions/setup-go@v4
58+
uses: actions/setup-go@v5
5959
with:
6060
go-version: ${{ env.GO_VERSION }}
6161
cache: true
@@ -66,7 +66,7 @@ jobs:
6666
echo "/home/runner/work/gpbackup/gpbackup/go/bin" >> $GITHUB_PATH
6767
6868
- name: Cache Go modules
69-
uses: actions/cache@v3
69+
uses: actions/cache@v4
7070
with:
7171
path: |
7272
~/.cache/go-build
@@ -97,14 +97,15 @@ jobs:
9797
make coverage
9898
9999
- name: Upload coverage to Codecov
100-
uses: codecov/codecov-action@v3
100+
uses: codecov/codecov-action@v4
101101
with:
102102
file: /tmp/coverage.out
103103
flags: unittests
104104
name: codecov-ubuntu-latest-go${{ env.GO_VERSION }}
105+
fail_ci_if_error: false
105106

106107
- name: Upload build artifacts
107-
uses: actions/upload-artifact@v3
108+
uses: actions/upload-artifact@v4
108109
with:
109110
name: binaries-ubuntu-latest-go${{ env.GO_VERSION }}
110111
path: |
@@ -148,21 +149,21 @@ jobs:
148149
with:
149150
repository: apache/cloudberry
150151
ref: main
151-
fetch-depth: 0
152+
fetch-depth: 1
152153
path: cloudberry
153154

154155
- name: Checkout backup utility code
155156
uses: actions/checkout@v4
156157
with:
157-
fetch-depth: 0
158+
fetch-depth: 1
158159
path: cloudberry-backup
159160

160161
- name: Set up Go in container
161162
run: |
162163
# Install Go 1.21 in the container
163164
cd /tmp
164-
wget -q https://go.dev/dl/go1.21.0.linux-amd64.tar.gz
165-
tar -C /usr/local -xzf go1.21.0.linux-amd64.tar.gz
165+
wget -q https://go.dev/dl/go${{ env.GO_VERSION }}.linux-amd64.tar.gz
166+
tar -C /usr/local -xzf go${{ env.GO_VERSION }}.linux-amd64.tar.gz
166167
echo 'export PATH=$PATH:/usr/local/go/bin' >> /etc/profile
167168
echo 'export GOPATH=/home/gpadmin/go' >> /etc/profile
168169
echo 'export PATH=$PATH:/home/gpadmin/go/bin' >> /etc/profile

0 commit comments

Comments
 (0)