Skip to content

Commit d051c81

Browse files
committed
test: reflactor env define
1 parent 0d3c542 commit d051c81

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

.github/workflows/pr_check.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,19 @@ defaults:
88
run:
99
shell: bash
1010

11+
env:
12+
GO_VERSION: 1.23.4
13+
PNAME: agent
14+
1115
jobs:
1216
unit_test:
1317
runs-on: ubuntu-latest
14-
env:
15-
GO_VERSION: 1.23.4
1618
steps:
1719
- name: Checkout current repository
1820
uses: actions/checkout@v4
1921
with:
2022
fetch-depth: 0
21-
path: agent
23+
path: ${{ env.PNAME }}
2224

2325
- name: Checkout framework repository
2426
uses: actions/checkout@v4
@@ -51,7 +53,7 @@ jobs:
5153
run: |
5254
echo Home path is $HOME
5355
export WORKBASE=$HOME/go/src/infini.sh
54-
export WORK=$WORKBASE/agent
56+
export WORK=$WORKBASE/$PNAME
5557
5658
# for test workspace
5759
mkdir -p $HOME/go/src/
@@ -68,14 +70,12 @@ jobs:
6870
6971
code_lint:
7072
runs-on: ubuntu-latest
71-
env:
72-
GO_VERSION: 1.23.4
7373
steps:
7474
- name: Checkout current repository
7575
uses: actions/checkout@v4
7676
with:
7777
fetch-depth: 0
78-
path: agent
78+
path: ${{ env.PNAME }}
7979

8080
- name: Checkout framework repository
8181
uses: actions/checkout@v4
@@ -108,7 +108,7 @@ jobs:
108108
run: |
109109
echo Home path is $HOME
110110
export WORKBASE=$HOME/go/src/infini.sh
111-
export WORK=$WORKBASE/agent
111+
export WORK=$WORKBASE/$PNAME
112112
113113
# for test workspace
114114
mkdir -p $HOME/go/src/

0 commit comments

Comments
 (0)