From fba136de01b6fe8c0530626587c7a1f7f6157563 Mon Sep 17 00:00:00 2001 From: Paulo Gomes Date: Sun, 5 Mar 2023 16:35:06 +0000 Subject: [PATCH 1/3] tests: Avoid use of user's GPG keys during tests The TestPullAdd test uses git CLI to perform a commit. Contributors with signing enabled globally would have their GPG configuration being used to sign that test commit. This behaviour was transparent for contributors that do not use secure keys which requires physical confirmation. The new behaviour disables GPG signing for that test, which was not required as part of the test. Signed-off-by: Paulo Gomes --- worktree_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worktree_test.go b/worktree_test.go index b57a77dbf..ac56a4688 100644 --- a/worktree_test.go +++ b/worktree_test.go @@ -259,7 +259,7 @@ func (s *RepositorySuite) TestPullAdd(c *C) { ExecuteOnPath(c, path, "touch foo", "git add foo", - "git commit -m foo foo", + "git commit --no-gpg-sign -m foo foo", ) w, err := r.Worktree() From 7368bb92af69a10ca786bfdcbbd52008e3d8395c Mon Sep 17 00:00:00 2001 From: Paulo Gomes Date: Sun, 5 Mar 2023 16:37:14 +0000 Subject: [PATCH 2/3] ci: Bump GitHub actions Removes the error messages: Node.js 12 actions are deprecated. Signed-off-by: Paulo Gomes --- .github/workflows/git.yml | 4 ++-- .github/workflows/test.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/git.yml b/.github/workflows/git.yml index f3dbe479d..c945e72ff 100644 --- a/.github/workflows/git.yml +++ b/.github/workflows/git.yml @@ -17,12 +17,12 @@ jobs: steps: - name: Install Go - uses: actions/setup-go@v1 + uses: actions/setup-go@v3 with: go-version: 1.20.x - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Install build dependencies run: sudo apt-get install gettext diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a7b614b32..ce5872d03 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,12 +14,12 @@ jobs: runs-on: ${{ matrix.platform }} steps: - name: Install Go - uses: actions/setup-go@v1 + uses: actions/setup-go@v3 with: go-version: ${{ matrix.go-version }} - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Configure known hosts if: matrix.platform != 'ubuntu-latest' From eddd209ed525a7814ffc80fc2bcd05eb31d0c23a Mon Sep 17 00:00:00 2001 From: Paulo Gomes Date: Sun, 5 Mar 2023 16:41:54 +0000 Subject: [PATCH 3/3] ci: Enable race detection for go tests After the fix of data races in go-billy (go-git/go-billy/pull/28) race detection can be enabled in go-git to ensure no new issues go undetected. Signed-off-by: Paulo Gomes --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d10922fb1..2acb8bc45 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ build-git: test: @echo "running against `git version`"; \ - $(GOTEST) ./... + $(GOTEST) -race ./... test-coverage: @echo "running against `git version`"; \