From 676ba50a4b8472e388f2aa378b6be24258f8d046 Mon Sep 17 00:00:00 2001 From: icpd <35096485+icpd@users.noreply.github.com> Date: Thu, 8 Aug 2024 17:35:07 +0800 Subject: [PATCH] Update module path and streamline Go testing workflow Changed the module path in `go.mod` for test modules and removed unnecessary indirect dependencies in `go.sum`. Also improved the GitHub Action workflow by explicitly navigating to the tests directory before running `go test ./...`. --- .github/workflows/go.yml | 3 ++- tests/go.mod | 6 ++---- tests/go.sum | 2 -- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 8415d47..33f618e 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -25,4 +25,5 @@ jobs: ${{ runner.os }}-go- - name: Get dependencies, run test run: | - go test ./tests/... + cd tests + go test ./... diff --git a/tests/go.mod b/tests/go.mod index 402e2db..55193f4 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -1,4 +1,4 @@ -module tests +module gorm.io/plugin/optimisticlock/tests go 1.18 @@ -15,6 +15,4 @@ require ( golang.org/x/text v0.14.0 // indirect ) -replace ( - gorm.io/plugin/optimisticlock => ../ -) +replace gorm.io/plugin/optimisticlock => ../ diff --git a/tests/go.sum b/tests/go.sum index d80e7bb..33c59d5 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -10,5 +10,3 @@ gorm.io/driver/sqlite v1.5.6 h1:fO/X46qn5NUEEOZtnjJRWRzZMe8nqJiQ9E+0hi+hKQE= gorm.io/driver/sqlite v1.5.6/go.mod h1:U+J8craQU6Fzkcvu8oLeAQmi50TkwPEhHDEjQZXDah4= gorm.io/gorm v1.25.11 h1:/Wfyg1B/je1hnDx3sMkX+gAlxrlZpn6X0BXRlwXlvHg= gorm.io/gorm v1.25.11/go.mod h1:xh7N7RHfYlNc5EmcI/El95gXusucDrQnHXe0+CgWcLQ= -gorm.io/plugin/optimisticlock v1.1.3 h1:uFK8zz+Ln6ju3vGkTd1LY3xR2VBmMxjdU12KBb58PBA= -gorm.io/plugin/optimisticlock v1.1.3/go.mod h1:S+MH7qnHGQHxDBc9phjgN+DpNPn/qESd1q69fA3dtkg=