mirror of https://gitea.com/gitea/go-sdk.git
Test against gitea v1.15.x (#539)
depend on release of gitea v1.15.0 Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/539 Reviewed-by: Andrew Thornton <art27@cantab.net> Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: 6543 <6543@obermui.de> Co-committed-by: 6543 <6543@obermui.de>
This commit is contained in:
parent
747c78e835
commit
af535b2d3a
|
@ -12,7 +12,7 @@ workspace:
|
|||
|
||||
steps:
|
||||
- name: gitea
|
||||
image: gitea/gitea:latest
|
||||
image: gitea/gitea:1.15
|
||||
detach: true
|
||||
commands:
|
||||
- mkdir -p /tmp/conf/
|
||||
|
|
12
Makefile
12
Makefile
|
@ -8,7 +8,7 @@ GITEA_SDK_TEST_PASSWORD ?= test01
|
|||
|
||||
PACKAGE := code.gitea.io/sdk/gitea
|
||||
|
||||
GITEA_DL := https://dl.gitea.io/gitea/main/gitea-main-
|
||||
GITEA_DL := https://dl.gitea.io/gitea/1.15/gitea-1.15-
|
||||
UNAME_S := $(shell uname -s)
|
||||
ifeq ($(UNAME_S),Linux)
|
||||
GITEA_DL := $(GITEA_DL)linux-
|
||||
|
@ -87,8 +87,8 @@ test:
|
|||
test-instance:
|
||||
rm -f -r ${WORK_DIR}/test 2> /dev/null; \
|
||||
mkdir -p ${WORK_DIR}/test/conf/ ${WORK_DIR}/test/data/
|
||||
wget ${GITEA_DL} -O ${WORK_DIR}/test/gitea-main; \
|
||||
chmod +x ${WORK_DIR}/test/gitea-main; \
|
||||
wget ${GITEA_DL} -O ${WORK_DIR}/test/gitea-1.15; \
|
||||
chmod +x ${WORK_DIR}/test/gitea-1.15; \
|
||||
echo "[security]" > ${WORK_DIR}/test/conf/app.ini; \
|
||||
echo "INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE1NTg4MzY4ODB9.LoKQyK5TN_0kMJFVHWUW0uDAyoGjDP6Mkup4ps2VJN4" >> ${WORK_DIR}/test/conf/app.ini; \
|
||||
echo "INSTALL_LOCK = true" >> ${WORK_DIR}/test/conf/app.ini; \
|
||||
|
@ -100,9 +100,9 @@ test-instance:
|
|||
echo "ROOT = ${WORK_DIR}/test/data/" >> ${WORK_DIR}/test/conf/app.ini; \
|
||||
echo "[server]" >> ${WORK_DIR}/test/conf/app.ini; \
|
||||
echo "ROOT_URL = ${GITEA_SDK_TEST_URL}" >> ${WORK_DIR}/test/conf/app.ini; \
|
||||
${WORK_DIR}/test/gitea-main migrate -c ${WORK_DIR}/test/conf/app.ini; \
|
||||
${WORK_DIR}/test/gitea-main admin user create --username=${GITEA_SDK_TEST_USERNAME} --password=${GITEA_SDK_TEST_PASSWORD} --email=test01@gitea.io --admin=true --must-change-password=false --access-token -c ${WORK_DIR}/test/conf/app.ini; \
|
||||
${WORK_DIR}/test/gitea-main web -c ${WORK_DIR}/test/conf/app.ini
|
||||
${WORK_DIR}/test/gitea-1.15 migrate -c ${WORK_DIR}/test/conf/app.ini; \
|
||||
${WORK_DIR}/test/gitea-1.15 admin user create --username=${GITEA_SDK_TEST_USERNAME} --password=${GITEA_SDK_TEST_PASSWORD} --email=test01@gitea.io --admin=true --must-change-password=false --access-token -c ${WORK_DIR}/test/conf/app.ini; \
|
||||
${WORK_DIR}/test/gitea-1.15 web -c ${WORK_DIR}/test/conf/app.ini
|
||||
|
||||
.PHONY: bench
|
||||
bench:
|
||||
|
|
Loading…
Reference in New Issue