Merge pull request #305 from alessandro-sorint/gitea

ci: update gitea to v1.15.11
This commit is contained in:
Simone Gotti 2022-02-15 10:06:33 +01:00 committed by GitHub
commit d0d219cbf1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 7 deletions

View File

@ -37,7 +37,7 @@ local task_build_go(version, arch) = {
{ type: 'run', name: 'build docker/k8s drivers tests binary', command: 'CGO_ENABLED=0 go test -c ./internal/services/executor/driver -o ./bin/docker-tests' },
{ type: 'run', name: 'build integration tests binary', command: 'go test -tags "sqlite_unlock_notify" -c ./tests -o ./bin/integration-tests' },
{ type: 'run', name: 'run tests', command: 'SKIP_DOCKER_TESTS=1 SKIP_K8S_TESTS=1 go test -v -count 1 $(go list ./... | grep -v /tests)' },
{ type: 'run', name: 'fetch gitea binary for integration tests', command: 'curl -L https://github.com/go-gitea/gitea/releases/download/v1.8.3/gitea-1.8.3-linux-amd64 -o ./bin/gitea && chmod +x ./bin/gitea' },
{ type: 'run', name: 'fetch gitea binary for integration tests', command: 'curl -L https://github.com/go-gitea/gitea/releases/download/v1.15.11/gitea-1.15.11-linux-amd64 -o ./bin/gitea && chmod +x ./bin/gitea' },
{ type: 'save_to_workspace', contents: [{ source_dir: './bin', dest_dir: '/bin/', paths: ['*'] }] },
],
};

View File

@ -377,11 +377,6 @@ OFFLINE_MODE = false
[database]
PATH = {{ .Data }}/gitea/gitea.db
DB_TYPE = sqlite3
HOST =
NAME =
USER =
PASSWD =
SSL_MODE = disable
[indexer]
ISSUE_INDEXER_PATH = {{ .Data }}/gitea/indexers/issues.bleve

View File

@ -104,7 +104,7 @@ func setupGitea(t *testing.T, dir, dockerBridgeAddress string) *testutil.TestGit
// wait for gitea ready
err = testutil.Wait(30*time.Second, func() (bool, error) {
cmd := exec.Command(tgitea.GiteaPath, "admin", "create-user", "--name", giteaUser01, "--email", giteaUser01+"@example.com", "--password", "password", "--admin", "--config", tgitea.ConfigPath)
cmd := exec.Command(tgitea.GiteaPath, "admin", "user", "create", "--name", giteaUser01, "--email", giteaUser01+"@example.com", "--password", "password", "--admin", "--config", tgitea.ConfigPath)
// just retry until no error
if err := cmd.Run(); err != nil {
return false, nil