diff --git a/.gitea/workflows/pr-checks.yml b/.gitea/workflows/pr-checks.yml index 41fbf5d..a88050d 100644 --- a/.gitea/workflows/pr-checks.yml +++ b/.gitea/workflows/pr-checks.yml @@ -10,6 +10,9 @@ jobs: runs-on: ubuntu-latest container: image: golang:1.27-bookworm + volumes: + - go-mod-cache:/go/pkg/mod + - go-build-cache:/root/.cache/go-build steps: - name: Install system dependencies run: | @@ -20,9 +23,6 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Lint - run: make lint - - name: Check formatting run: | unformatted=$(gofmt -l .) @@ -32,6 +32,12 @@ jobs: exit 1 fi + - name: Download modules + run: go mod download + + - name: Lint + run: make lint + - name: Test run: make test diff --git a/internal/domain/list.go b/internal/domain/list.go index 923af15..8e96094 100644 --- a/internal/domain/list.go +++ b/internal/domain/list.go @@ -152,7 +152,7 @@ func (s *ListService) OrderLists(ctx context.Context, authUserID string, listIDs if !isPermutation(listIDs, serverIDs) { slog.ErrorContext(ctx, "no permutation", - slog.Any("client_lids_ids", listIDs), + slog.Any("client_list_ids", listIDs), slog.Any("server_list_ids", serverIDs)) return ErrStaleListIDs } diff --git a/internal/repository/list.go b/internal/repository/list.go index e8e06f5..12a303f 100644 --- a/internal/repository/list.go +++ b/internal/repository/list.go @@ -107,6 +107,7 @@ func (r *ListRepo) LockUsersLists(ctx context.Context, userID string) ([]string, if err != nil { return nil, fmt.Errorf("failed to lock users lists: %w", err) } + defer rows.Close() ids := make([]string, 0, 16) for rows.Next() {