refactor: Update Go setup action to version 5
This commit is contained in:
parent
caabd88672
commit
f44ef832e7
2 changed files with 46 additions and 29 deletions
38
.github/workflows/pr-test.yml
vendored
38
.github/workflows/pr-test.yml
vendored
|
|
@ -122,16 +122,6 @@ jobs:
|
|||
body: 'Thank you for the PR! The db: ${{ matrix.db }} redis: ${{ matrix.redis }} mongo: ${{ matrix.mongo }} test workflow is running, the results of the run will be commented later.'
|
||||
});
|
||||
|
||||
- name: Setup Cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cache/go-build
|
||||
~/go/pkg/mod
|
||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-go-
|
||||
|
||||
- name: Checkout Kun
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
|
|
@ -206,6 +196,29 @@ jobs:
|
|||
with:
|
||||
redis-version: ${{ matrix.redis }}
|
||||
|
||||
- name: Setup Go ${{ matrix.go }}
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
|
||||
- name: Setup Cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cache/go-build
|
||||
~/go/pkg/mod
|
||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-go-
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
go mod download
|
||||
cd ../kun && go mod download
|
||||
cd ../xun && go mod download
|
||||
cd ../gou && go mod download
|
||||
cd ../v8go && go mod download
|
||||
|
||||
- name: Start MongoDB
|
||||
uses: supercharge/mongodb-github-action@1.8.0
|
||||
with:
|
||||
|
|
@ -231,11 +244,6 @@ jobs:
|
|||
user: "xiang"
|
||||
password: ${{ secrets.UNIT_PASS }}
|
||||
|
||||
- name: Setup Go ${{ matrix.go }}
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
|
||||
- name: Setup Go Tools
|
||||
run: |
|
||||
make tools
|
||||
|
|
|
|||
37
.github/workflows/unit-test.yml
vendored
37
.github/workflows/unit-test.yml
vendored
|
|
@ -79,15 +79,6 @@ jobs:
|
|||
redis: [4, 5, 6]
|
||||
mongo: ["6.0"]
|
||||
steps:
|
||||
- name: Setup Cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cache/go-build
|
||||
~/go/pkg/mod
|
||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-go-
|
||||
|
||||
- name: Checkout Kun
|
||||
uses: actions/checkout@v4
|
||||
|
|
@ -156,6 +147,29 @@ jobs:
|
|||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Go ${{ matrix.go }}
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
|
||||
- name: Setup Cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cache/go-build
|
||||
~/go/pkg/mod
|
||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-go-
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
go mod download
|
||||
cd ../kun && go mod download
|
||||
cd ../xun && go mod download
|
||||
cd ../gou && go mod download
|
||||
cd ../v8go && go mod download
|
||||
|
||||
- name: Start Redis
|
||||
uses: supercharge/redis-github-action@1.4.0
|
||||
with:
|
||||
|
|
@ -186,11 +200,6 @@ jobs:
|
|||
user: "xiang"
|
||||
password: ${{ secrets.UNIT_PASS }}
|
||||
|
||||
- name: Setup Go ${{ matrix.go }}
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
|
||||
- name: Setup Go Tools
|
||||
run: |
|
||||
make tools
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue