From b8a4d8d8dacb5328b6684914b2a19e5cdc142a71 Mon Sep 17 00:00:00 2001 From: Andrei Alexandru Date: Sun, 2 Nov 2025 11:13:20 +0200 Subject: [PATCH] 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 --- .github/workflows/go-test.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index d4e3375..da8fe9f 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -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