@ -32,6 +32,7 @@ steps:
pull : always
pull : always
commands:
commands:
- make deps-backend
- make deps-backend
- make deps-tools
volumes:
volumes:
- name : deps
- name : deps
path : /go
path : /go
@ -168,7 +169,7 @@ steps:
---
---
kind : pipeline
kind : pipeline
type : docker
type : docker
name : testing-amd64
name : testing-pgsql
platform:
platform:
os : linux
os : linux
@ -191,51 +192,26 @@ volumes:
temp : {}
temp : {}
services:
services:
- name : mysql
- name : pgsql
image : mysql:5.7
pull : default
pull : always
image : postgres:15
environment:
MYSQL_ALLOW_EMPTY_PASSWORD : yes
MYSQL_DATABASE : test
- name : mysql8
image : mysql:8
pull : always
environment:
MYSQL_ALLOW_EMPTY_PASSWORD : yes
MYSQL_DATABASE : testgitea
- name : mssql
image : mcr.microsoft.com/mssql/server:latest
pull : always
environment:
environment:
ACCEPT_EULA : Y
POSTGRES_DB : test
MSSQL_PID : Standard
POSTGRES_PASSWORD : postgres
SA_PASSWORD : MwantsaSecurePassword1
- name : ldap
- name : ldap
image : gitea/test-openldap:latest
image : gitea/test-openldap:latest
pull : always
pull : always
- name : elasticsearch
image : elasticsearch:7.5.0
pull : always
environment:
discovery.type : single-node
- name : minio
- name : minio
image : minio/minio:RELEASE.2021-03-12T00-00-47Z
image : minio/minio:RELEASE.2021-03-12T00-00-47Z
pull : always
pull : always
commands:
commands:
- minio server /data
- minio server /data
environment:
environment:
MINIO_ACCESS_KEY : 123456
MINIO_ACCESS_KEY : 123456
MINIO_SECRET_KEY : 12345678
MINIO_SECRET_KEY : 12345678
- name : smtpimap
image : tabascoterrier/docker-imap-devel:latest
pull : always
steps:
steps:
- name : fetch-tags
- name : fetch-tags
image : docker:git
image : docker:git
@ -257,12 +233,6 @@ steps:
- name : deps
- name : deps
path : /go
path : /go
- name : tag-pre-condition
image : drone/git
pull : always
commands:
- git update-ref refs/heads/tag_test ${DRONE_COMMIT_SHA}
- name : prepare-test-env
- name : prepare-test-env
image : gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
image : gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
pull : always
pull : always
@ -278,88 +248,157 @@ steps:
environment:
environment:
GOPROXY : https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
GOPROXY : https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
GOSUMDB : sum.golang.org
GOSUMDB : sum.golang.org
TAGS : bindata sqlite sqlite_unlock_notify
TAGS : bindata
depends_on : [ deps-backend, prepare-test-env]
depends_on : [ deps-backend, prepare-test-env]
volumes:
volumes:
- name : deps
- name : deps
path : /go
path : /go
- name : unit- test
- name : test-pgsql
image : gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
image : gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
user : gitea
user : gitea
commands:
commands:
- make unit-test-coverage test-check
- timeout -s ABRT 50m make test-pgsql-migration test-pgsql
environment:
environment:
GOPROXY : https://goproxy.io
GOPROXY : https://goproxy.io
TAGS : bindata sqlite sqlite_unlock_notify
TAGS : bindata gogit
RACE_ENABLED : true
RACE_ENABLED : true
GITHUB_READ_TOKEN:
TEST_TAGS : gogit
from_secret : github_read_token
TEST_LDAP : 1
depends_on : [ deps-backend, prepare-test-env]
USE_REPO_TEST_DIR : 1
depends_on : [ build]
volumes:
volumes:
- name : deps
- name : deps
path : /go
path : /go
- name : unit-test-gogit
---
kind : pipeline
type : docker
name : testing-mysql
platform:
os : linux
arch : amd64
depends_on:
- compliance
trigger:
event:
- push
- tag
- pull_request
paths:
exclude:
- docs/**
volumes:
- name : deps
temp : {}
services:
- name : mysql
image : mysql:5.7
pull : always
environment:
MYSQL_ALLOW_EMPTY_PASSWORD : yes
MYSQL_DATABASE : test
- name : elasticsearch
image : elasticsearch:7.5.0
pull : always
environment:
discovery.type : single-node
- name : smtpimap
image : tabascoterrier/docker-imap-devel:latest
pull : always
steps:
- name : fetch-tags
image : docker:git
pull : always
commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force
when:
event:
exclude:
- pull_request
- name : deps-backend
image : golang:1.20
pull : always
commands:
- make deps-backend
volumes:
- name : deps
path : /go
- name : prepare-test-env
image : gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
pull : always
commands:
- ./build/test-env-prepare.sh
- name : build
image : gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
image : gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
user : gitea
user : gitea
commands:
commands:
- make unit-test-coverage test-check
- ./build/test-env-check.sh
- make backend
environment:
environment:
GOPROXY : https://goproxy.io
GOPROXY : https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
TAGS : bindata gogit sqlite sqlite_unlock_notify
GOSUMDB : sum.golang.org
RACE_ENABLED : true
TAGS : bindata
GITHUB_READ_TOKEN:
from_secret : github_read_token
depends_on : [ deps-backend, prepare-test-env]
depends_on : [ deps-backend, prepare-test-env]
volumes:
volumes:
- name : deps
- name : deps
path : /go
path : /go
- name : test-mysql
- name : unit- test
image : gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
image : gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
user : gitea
user : gitea
commands:
commands:
- make test-mysql-migration integration-test-coverage
- make unit-test-coverage test-check
environment:
environment:
GOPROXY : https://goproxy.io
GOPROXY : https://goproxy.io
TAGS : bindata
TAGS : bindata
RACE_ENABLED : true
RACE_ENABLED : true
TEST_LDAP : 1
GITHUB_READ_TOKEN:
USE_REPO_TEST_DIR : 1
from_secret : github_read_token
TEST_INDEXER_CODE_ES_URL : "http://elastic:changeme@elasticsearch:9200"
depends_on : [ deps-backend, prepare-test-env]
depends_on : [ build]
volumes:
volumes:
- name : deps
- name : deps
path : /go
path : /go
- name : test-mysql8
- name : unit-test-gogit
image : gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
image : gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
user : gitea
user : gitea
commands:
commands:
- timeout -s ABRT 50m make test-mysql8-migration test-mysql8
- make unit-test-coverage test-check
environment:
environment:
GOPROXY : https://goproxy.io
GOPROXY : https://goproxy.io
TAGS : bindata
TAGS : bindata gogit
RACE_ENABLED : true
RACE_ENABLED : true
TEST_LDAP : 1
GITHUB_READ_TOKEN:
USE_REPO_TEST_DIR : 1
from_secret : github_read_token
depends_on : [ build]
depends_on : [ deps-backend, prepare-test-env ]
volumes:
volumes:
- name : deps
- name : deps
path : /go
path : /go
- name : test-mssql
- name : test-my sql
image : gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
image : gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
user : gitea
user : gitea
commands:
commands:
- make test-mssql-migration test-mssql
- make test-mysql-migration integration-test-coverage
environment:
environment:
GOPROXY : https://goproxy.io
GOPROXY : https://goproxy.io
TAGS : bindata
TAGS : bindata
RACE_ENABLED : true
RACE_ENABLED : true
TEST_LDAP : 1
USE_REPO_TEST_DIR : 1
USE_REPO_TEST_DIR : 1
TEST_INDEXER_CODE_ES_URL : "http://elastic:changeme@elasticsearch:9200"
depends_on : [ build]
depends_on : [ build]
volumes:
volumes:
- name : deps
- name : deps
@ -398,11 +437,12 @@ steps:
---
---
kind : pipeline
kind : pipeline
name : testing-arm64
type : docker
name : testing-mysql8
platform:
platform:
os : linux
os : linux
arch : ar m64
arch : amd 64
depends_on:
depends_on:
- compliance
- compliance
@ -421,16 +461,102 @@ volumes:
temp : {}
temp : {}
services:
services:
- name : pgsql
- name : mysql8
pull : default
image : mysql:8
image : postgres:10
pull : always
environment:
environment:
POSTGRES_DB : test
MYSQL_ALLOW_EMPTY_PASSWORD : yes
POSTGRES_PASSWORD : postgres
MYSQL_DATABASE : testgitea
- name : ldap
steps:
pull : default
- name : fetch-tags
image : gitea/test-openldap:latest
image : docker:git
pull : always
commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force
when:
event:
exclude:
- pull_request
- name : deps-backend
image : golang:1.20
pull : always
commands:
- make deps-backend
volumes:
- name : deps
path : /go
- name : prepare-test-env
image : gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
pull : always
commands:
- ./build/test-env-prepare.sh
- name : build
image : gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
user : gitea
commands:
- ./build/test-env-check.sh
- make backend
environment:
GOPROXY : https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
GOSUMDB : sum.golang.org
TAGS : bindata
depends_on : [ deps-backend, prepare-test-env]
volumes:
- name : deps
path : /go
- name : test-mysql8
image : gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
user : gitea
commands:
- timeout -s ABRT 50m make test-mysql8-migration test-mysql8
environment:
GOPROXY : https://goproxy.io
TAGS : bindata
USE_REPO_TEST_DIR : 1
depends_on : [ build]
volumes:
- name : deps
path : /go
---
kind : pipeline
type : docker
name : testing-mssql
platform:
os : linux
arch : amd64
depends_on:
- compliance
trigger:
event:
- push
- tag
- pull_request
paths:
exclude:
- docs/**
volumes:
- name : deps
temp : {}
services:
- name : mssql
image : mcr.microsoft.com/mssql/server:latest
pull : always
environment:
ACCEPT_EULA : Y
MSSQL_PID : Standard
SA_PASSWORD : MwantsaSecurePassword1
steps:
steps:
- name : fetch-tags
- name : fetch-tags
@ -454,13 +580,13 @@ steps:
path : /go
path : /go
- name : prepare-test-env
- name : prepare-test-env
image : gitea/test_env:linux-ar m64 # https://gitea.com/gitea/test-env
image : gitea/test_env:linux-amd 64 # https://gitea.com/gitea/test-env
pull : always
pull : always
commands:
commands:
- ./build/test-env-prepare.sh
- ./build/test-env-prepare.sh
- name : build
- name : build
image : gitea/test_env:linux-ar m64 # https://gitea.com/gitea/test-env
image : gitea/test_env:linux-amd 64 # https://gitea.com/gitea/test-env
user : gitea
user : gitea
commands:
commands:
- ./build/test-env-check.sh
- ./build/test-env-check.sh
@ -468,39 +594,102 @@ steps:
environment:
environment:
GOPROXY : https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
GOPROXY : https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
GOSUMDB : sum.golang.org
GOSUMDB : sum.golang.org
TAGS : bindata gogit sqlite sqlite_unlock_notify
TAGS : bindata
depends_on : [ deps-backend, prepare-test-env]
depends_on : [ deps-backend, prepare-test-env]
volumes:
volumes:
- name : deps
- name : deps
path : /go
path : /go
- name : test-sqlite
- name : test-ms sql
image : gitea/test_env:linux-ar m64 # https://gitea.com/gitea/test-env
image : gitea/test_env:linux-amd 64 # https://gitea.com/gitea/test-env
user : gitea
user : gitea
commands:
commands:
- timeout -s ABRT 50m make test-sqlite -migration test-sqlite
- make test-ms sql-migration test-ms sql
environment:
environment:
GOPROXY : https://goproxy.io
GOPROXY : https://goproxy.io
TAGS : bindata gogit sqlite sqlite_unlock_notify
TAGS : bindata
RACE_ENABLED : true
TEST_TAGS : gogit sqlite sqlite_unlock_notify
USE_REPO_TEST_DIR : 1
USE_REPO_TEST_DIR : 1
depends_on : [ build]
depends_on : [ build]
volumes:
volumes:
- name : deps
- name : deps
path : /go
path : /go
- name : test-pgsql
---
kind : pipeline
name : testing-sqlite
platform:
os : linux
arch : arm64
depends_on:
- compliance
trigger:
event:
- push
- tag
- pull_request
paths:
exclude:
- docs/**
volumes:
- name : deps
temp : {}
steps:
- name : fetch-tags
image : docker:git
pull : always
commands:
- git config --global --add safe.directory /drone/src
- git fetch --tags --force
when:
event:
exclude:
- pull_request
- name : deps-backend
image : golang:1.20
pull : always
commands:
- make deps-backend
volumes:
- name : deps
path : /go
- name : prepare-test-env
image : gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env
pull : always
commands:
- ./build/test-env-prepare.sh
- name : build
image : gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env
image : gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env
user : gitea
user : gitea
commands:
commands:
- timeout -s ABRT 50m make test-pgsql-migration test-pgsql
- ./build/test-env-check.sh
- make backend
environment:
GOPROXY : https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
GOSUMDB : sum.golang.org
TAGS : bindata gogit sqlite sqlite_unlock_notify
depends_on : [ deps-backend, prepare-test-env]
volumes:
- name : deps
path : /go
- name : test-sqlite
image : gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env
user : gitea
commands:
- timeout -s ABRT 50m make test-sqlite-migration test-sqlite
environment:
environment:
GOPROXY : https://goproxy.io
GOPROXY : https://goproxy.io
TAGS : bindata gogit
TAGS : bindata gogit sqlite sqlite_unlock_notify
RACE_ENABLED : true
RACE_ENABLED : true
TEST_TAGS : gogit
TEST_TAGS : gogit sqlite sqlite_unlock_notify
TEST_LDAP : 1
USE_REPO_TEST_DIR : 1
USE_REPO_TEST_DIR : 1
depends_on : [ build]
depends_on : [ build]
volumes:
volumes:
@ -530,15 +719,6 @@ volumes:
- name : deps
- name : deps
temp : {}
temp : {}
services:
- name : pgsql
pull : default
image : postgres:10
environment:
POSTGRES_DB : testgitea-e2e
POSTGRES_PASSWORD : postgres
POSTGRES_INITDB_ARGS : --encoding=UTF8 --lc-collate='en_US.UTF-8' --lc-ctype='en_US.UTF-8'
steps:
steps:
- name : deps-frontend
- name : deps-frontend
image : node:18
image : node:18
@ -568,14 +748,12 @@ steps:
- curl -sLO https://go.dev/dl/go1.20.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.20.linux-amd64.tar.gz
- curl -sLO https://go.dev/dl/go1.20.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.20.linux-amd64.tar.gz
- groupadd --gid 1001 gitea && useradd -m --gid 1001 --uid 1001 gitea
- groupadd --gid 1001 gitea && useradd -m --gid 1001 --uid 1001 gitea
- apt-get -qq update && apt-get -qqy install build-essential
- apt-get -qq update && apt-get -qqy install build-essential
- export TEST_PGSQL_SCHEMA=''
- ./build/test-env-prepare.sh
- ./build/test-env-prepare.sh
- su gitea bash -c "export PATH=$PATH:/usr/local/go/bin && timeout -s ABRT 40m make test-e2e-pg sql"
- su gitea bash -c "export PATH=$PATH:/usr/local/go/bin && timeout -s ABRT 40m make test-e2e-sqlite "
environment:
environment:
GOPROXY : https://goproxy.io
GOPROXY : https://goproxy.io
GOSUMDB : sum.golang.org
GOSUMDB : sum.golang.org
USE_REPO_TEST_DIR : 1
USE_REPO_TEST_DIR : 1
TEST_PGSQL_DBNAME : 'testgitea-e2e'
DEBIAN_FRONTEND : noninteractive
DEBIAN_FRONTEND : noninteractive
depends_on : [ build-frontend, deps-backend]
depends_on : [ build-frontend, deps-backend]
volumes:
volumes:
@ -709,8 +887,11 @@ trigger:
- docs/**
- docs/**
depends_on:
depends_on:
- testing-amd64
- testing-mysql
- testing-arm64
- testing-mysql8
- testing-mssql
- testing-pgsql
- testing-sqlite
volumes:
volumes:
- name : deps
- name : deps
@ -842,8 +1023,11 @@ trigger:
- tag
- tag
depends_on:
depends_on:
- testing-arm64
- testing-mysql
- testing-amd64
- testing-mysql8
- testing-mssql
- testing-pgsql
- testing-sqlite
volumes:
volumes:
- name : deps
- name : deps
@ -994,8 +1178,11 @@ platform:
arch : amd64
arch : amd64
depends_on:
depends_on:
- testing-amd64
- testing-mysql
- testing-arm64
- testing-mysql8
- testing-mssql
- testing-pgsql
- testing-sqlite
trigger:
trigger:
ref:
ref:
@ -1064,8 +1251,11 @@ platform:
arch : amd64
arch : amd64
depends_on:
depends_on:
- testing-amd64
- testing-mysql
- testing-arm64
- testing-mysql8
- testing-mssql
- testing-pgsql
- testing-sqlite
trigger:
trigger:
ref:
ref:
@ -1129,8 +1319,11 @@ platform:
arch : amd64
arch : amd64
depends_on:
depends_on:
- testing-amd64
- testing-mysql
- testing-arm64
- testing-mysql8
- testing-mssql
- testing-pgsql
- testing-sqlite
trigger:
trigger:
ref:
ref:
@ -1192,8 +1385,11 @@ platform:
arch : amd64
arch : amd64
depends_on:
depends_on:
- testing-amd64
- testing-mysql
- testing-arm64
- testing-mysql8
- testing-mssql
- testing-pgsql
- testing-sqlite
trigger:
trigger:
ref:
ref:
@ -1292,8 +1488,11 @@ platform:
arch : arm64
arch : arm64
depends_on:
depends_on:
- testing-amd64
- testing-mysql
- testing-arm64
- testing-mysql8
- testing-mssql
- testing-pgsql
- testing-sqlite
trigger:
trigger:
ref:
ref:
@ -1362,8 +1561,11 @@ platform:
arch : arm64
arch : arm64
depends_on:
depends_on:
- testing-amd64
- testing-mysql
- testing-arm64
- testing-mysql8
- testing-mssql
- testing-pgsql
- testing-sqlite
trigger:
trigger:
ref:
ref:
@ -1427,8 +1629,11 @@ platform:
arch : arm64
arch : arm64
depends_on:
depends_on:
- testing-amd64
- testing-mysql
- testing-arm64
- testing-mysql8
- testing-mssql
- testing-pgsql
- testing-sqlite
trigger:
trigger:
ref:
ref:
@ -1493,8 +1698,11 @@ platform:
arch : arm64
arch : arm64
depends_on:
depends_on:
- testing-amd64
- testing-mysql
- testing-arm64
- testing-mysql8
- testing-mssql
- testing-pgsql
- testing-sqlite
trigger:
trigger:
ref:
ref:
@ -1607,7 +1815,6 @@ platform:
steps:
steps:
- name : manifest-rootless
- name : manifest-rootless
pull : always
image : plugins/manifest
image : plugins/manifest
pull : always
pull : always
settings:
settings:
@ -1671,8 +1878,11 @@ trigger:
- failure
- failure
depends_on:
depends_on:
- testing-amd64
- testing-mysql
- testing-arm64
- testing-mysql8
- testing-mssql
- testing-pgsql
- testing-sqlite
- release-version
- release-version
- release-latest
- release-latest
- docker-linux-amd64-release
- docker-linux-amd64-release