Correct Go workflow path to NewProxy module
- Fixed GitHub Actions CI workflow by setting the working directory to ./NewProxy - Added module caching to speed up dependency installation - Replaced 'go mod download' with 'go mod tidy' for automatic dependency resolution - Ensured all test and vet commands run inside the correct Go module directory - Resolved 'no modules specified' error during CI runs
This commit is contained in:
15
.github/workflows/go-test.yml
vendored
15
.github/workflows/go-test.yml
vendored
@@ -10,6 +10,9 @@ jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./NewProxy
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
@@ -19,8 +22,18 @@ jobs:
|
||||
with:
|
||||
go-version: '1.25'
|
||||
|
||||
- name: Cache Go modules
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/go/pkg/mod
|
||||
~/.cache/go-build
|
||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-go-
|
||||
|
||||
- name: Install dependencies
|
||||
run: go mod download
|
||||
run: go mod tidy
|
||||
|
||||
- name: Run unit tests
|
||||
run: go test ./... -v -cover
|
||||
|
||||
Reference in New Issue
Block a user