Skip to content

Commit 0a41325

Browse files
committed
Init postgres database
1 parent a63ba41 commit 0a41325

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

.drone.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -520,8 +520,9 @@ services:
520520
pull: default
521521
image: postgres:10
522522
environment:
523-
POSTGRES_DB: test
523+
POSTGRES_DB: testgitea
524524
POSTGRES_PASSWORD: postgres
525+
POSTGRES_INITDB_ARGS: --encoding=UTF8 --lc-collate='en_US.UTF-8' --lc-ctype='en_US.UTF-8'
525526

526527
steps:
527528
- name: tag-pre-condition
@@ -535,17 +536,18 @@ steps:
535536
image: mcr.microsoft.com/playwright:v1.18.1-focal
536537
commands:
537538
- curl -sL https://go.dev/dl/go1.17.6.linux-amd64.tar.gz -o go1.17.6.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.17.6.linux-amd64.tar.gz
538-
- groupadd --gid 1001 gitea
539-
- useradd -m --gid 1001 --uid 1001 gitea
539+
- groupadd --gid 1001 gitea && useradd -m --gid 1001 --uid 1001 gitea
540540
- ./build/test-env-prepare.sh
541-
- su gitea GOPROXY=$GOPROXY GOSUMDB=$GOSUMDB TAGS=$TAGS NO_DEPS_PLAYWRIGHT=$NO_DEPS_PLAYWRIGHT bash -c "export PATH=$PATH:/usr/local/go/bin && timeout -s ABRT 40m make test-e2e-pgsql"
541+
- su gitea bash -c "export PATH=$PATH:/usr/local/go/bin && timeout -s ABRT 40m make test-e2e-pgsql"
542542
environment:
543543
GOPROXY: https://goproxy.cn
544544
GOSUMDB: sum.golang.org
545545
TAGS: bindata
546546
USE_REPO_TEST_DIR: 1
547547
NO_DEPS_PLAYWRIGHT: 1
548-
TEST_LOGGER: console,file
548+
TEST_LOGGER: console,file # Debug
549+
TEST_PGSQL_SCHEMA: ''
550+
NPX_FLAGS: '--yes'
549551

550552
---
551553
kind: pipeline

tools/e2e/run_e2e.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ set -euo pipefail
44
[[ -z "${GITEA_CONF}" ]] && GiteaConfig='' || GiteaConfig="-C . -c ${GITEA_CONF}"
55

66
./${GITEA_EXECUTABLE:-gitea} ${GiteaConfig} --quiet web &
7+
sleep 30
78
npx playwright test ${E2E_TESTS:-""}
89

910
trap 'kill $(jobs -p)' EXIT

0 commit comments

Comments
 (0)