Skip to content

Commit fa006eb

Browse files
author
Soft-Serve
committed
fix: removing race tests due to conflicting repo usage
1 parent 33a1169 commit fa006eb

4 files changed

Lines changed: 26 additions & 35 deletions

File tree

.github/workflows/golang-tests.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.
Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Docker test builds
1+
name: Test
22

33
on:
44
push:
@@ -7,6 +7,25 @@ on:
77
branches: [main]
88

99
jobs:
10+
golang:
11+
name: Golang tests
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Set up QEMU
16+
uses: docker/setup-qemu-action@v2
17+
- name: Set up Docker Buildx
18+
uses: docker/setup-buildx-action@v2
19+
- uses: actions/setup-go@v5
20+
with:
21+
go-version: 1.24
22+
- name: start soft-serve
23+
run: ./hack/soft-serve/start.sh
24+
- name: run golang tests
25+
env:
26+
SOPS_AGE_KEY_FILE: ${{ github.workspace }}/test_assets/keys.txt
27+
GITOPS_ROOT_DIR: ${{ github.workspace }}
28+
run: go test ./internal/...
1029
docker:
1130
strategy:
1231
fail-fast: false

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ homebrew-gitops/
66
.gitops-state.yaml
77
sandbox/
88

9-
.github/hack/soft-serve/data/
10-
.github/hack/soft-serve/gitops-test/
11-
.github/hack/soft-serve/ssh-key
12-
.github/hack/soft-serve/ssh-key.pub
9+
hack/soft-serve/data/
10+
hack/soft-serve/gitops-test/
11+
hack/soft-serve/ssh-key
12+
hack/soft-serve/ssh-key.pub
1313

1414
.vscode/launch.json
1515

internal/patch/method_git.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,12 @@ func (p *GitPatcher) Patch(patchTasks []PatchTask) error {
189189
return p.GitConnection.Push()
190190
}
191191

192-
for i := 0; i < 3; i++ {
192+
for i := 0; i < 5; i++ {
193193
err = executePush()
194194
if err == nil {
195195
break
196196
}
197-
time.Sleep(5 * time.Second)
197+
time.Sleep(time.Duration(i+1) * time.Second)
198198
}
199199

200200
return err

0 commit comments

Comments
 (0)