From a6ef321c9aec1f7aaafc2e5299a2953b06d1fc85 Mon Sep 17 00:00:00 2001 From: Gapodo Date: Sun, 4 Dec 2022 18:04:04 +0100 Subject: [PATCH] full run prep --- .woodpecker/compliance-and-tests.yml | 176 +++++++++++++-------------- 1 file changed, 85 insertions(+), 91 deletions(-) diff --git a/.woodpecker/compliance-and-tests.yml b/.woodpecker/compliance-and-tests.yml index 9a36cee827..98e0a239f4 100644 --- a/.woodpecker/compliance-and-tests.yml +++ b/.woodpecker/compliance-and-tests.yml @@ -5,105 +5,99 @@ workspace: path: src/codeberg/gitea pipeline: - dummy: + deps-backend: image: golang:1.19 + pull: true + secrets: + - goproxy_override commands: - - exit 0 + - test "$${GOPROXY_OVERRIDE-}" != "" && export GOPROXY="$${GOPROXY_OVERRIDE}" + - make deps-backend -# pipeline: -# deps-backend: -# image: golang:1.19 -# pull: true -# secrets: -# - goproxy_override -# commands: -# - test "$${GOPROXY_OVERRIDE-}" != "" && export GOPROXY="$${GOPROXY_OVERRIDE}" -# - make deps-backend + security-check: + image: golang:1.19 + pull: true + secrets: + - goproxy_override + commands: + - test "$${GOPROXY_OVERRIDE-}" != "" && export GOPROXY="$${GOPROXY_OVERRIDE}" + - make security-check -# security-check: -# image: golang:1.19 -# pull: true -# secrets: -# - goproxy_override -# commands: -# - test "$${GOPROXY_OVERRIDE-}" != "" && export GOPROXY="$${GOPROXY_OVERRIDE}" -# - make security-check + lint-backend: + image: gitea/test_env:linux-amd64 + pull: true + secrets: + - goproxy_override + environment: + - TAGS=bindata sqlite sqlite_unlock_notify + - GOSUMDB=sum.golang.org + commands: + - test "$${GOPROXY_OVERRIDE-}" != "" && export GOPROXY="$${GOPROXY_OVERRIDE}" + - make lint-backend -# lint-backend: -# image: gitea/test_env:linux-amd64 -# pull: true -# secrets: -# - goproxy_override -# environment: -# - TAGS=bindata sqlite sqlite_unlock_notify -# - GOSUMDB=sum.golang.org -# commands: -# - test "$${GOPROXY_OVERRIDE-}" != "" && export GOPROXY="$${GOPROXY_OVERRIDE}" -# - make lint-backend + checks-backend: + image: golang:1.19 + pull: true + secrets: + - goproxy_override + commands: + - test "$${GOPROXY_OVERRIDE-}" != "" && export GOPROXY="$${GOPROXY_OVERRIDE}" + - make --always-make checks-backend -# checks-backend: -# image: golang:1.19 -# pull: true -# secrets: -# - goproxy_override -# commands: -# - test "$${GOPROXY_OVERRIDE-}" != "" && export GOPROXY="$${GOPROXY_OVERRIDE}" -# - make --always-make checks-backend + fetch-tags: + image: docker:git + pull: true + commands: + - git config --add safe.directory '*' + - git fetch --tags --force -# fetch-tags: -# image: docker:git -# pull: true -# commands: -# - git config --add safe.directory '*' -# - git fetch --tags --force + tag-pre-condition: + image: drone/git + pull: true + commands: + - git update-ref refs/heads/tag_test ${CI_COMMIT_SHA} -# tag-pre-condition: -# image: drone/git -# pull: true -# commands: -# - git update-ref refs/heads/tag_test ${CI_COMMIT_SHA} + prepare-test-env: + image: gitea/test_env:linux-amd64 + pull: true + secrets: + - goproxy_override + commands: + - test "$${GOPROXY_OVERRIDE-}" != "" && export GOPROXY="$${GOPROXY_OVERRIDE}" + - ./build/test-env-prepare.sh -# prepare-test-env: -# image: gitea/test_env:linux-amd64 -# pull: true -# secrets: -# - goproxy_override -# commands: -# - test "$${GOPROXY_OVERRIDE-}" != "" && export GOPROXY="$${GOPROXY_OVERRIDE}" -# - ./build/test-env-prepare.sh + build-test: + image: gitea/test_env:linux-amd64 + pull: true + secrets: + - goproxy_override + environment: + - GOSUMDB=sum.golang.org + - TAGS=bindata sqlite sqlite_unlock_notify + commands: + - test "$${GOPROXY_OVERRIDE-}" != "" && export GOPROXY="$${GOPROXY_OVERRIDE}" + - su gitea -c './build/test-env-check.sh' + - su gitea -c 'make backend' -# build-test: -# image: gitea/test_env:linux-amd64 -# pull: true -# secrets: -# - goproxy_override -# environment: -# - GOSUMDB=sum.golang.org -# - TAGS=bindata sqlite sqlite_unlock_notify -# commands: -# - test "$${GOPROXY_OVERRIDE-}" != "" && export GOPROXY="$${GOPROXY_OVERRIDE}" -# - su gitea -c './build/test-env-check.sh' -# - su gitea -c 'make backend' + unit-test: + image: gitea/test_env:linux-amd64 + pull: true + secrets: + - github_read_token + - goproxy_override + environment: + - TAGS=bindata sqlite sqlite_unlock_notify + - RACE_ENABLED=true + commands: + - test "$${GOPROXY_OVERRIDE-}" != "" && export GOPROXY="$${GOPROXY_OVERRIDE}" + - su gitea -c 'make unit-test-coverage test-check' -# unit-test: -# image: gitea/test_env:linux-amd64 -# pull: true -# secrets: -# - github_read_token -# - goproxy_override -# environment: -# - TAGS=bindata sqlite sqlite_unlock_notify -# - RACE_ENABLED=true -# commands: -# - test "$${GOPROXY_OVERRIDE-}" != "" && export GOPROXY="$${GOPROXY_OVERRIDE}" -# - su gitea -c 'make unit-test-coverage test-check' - -# test-sqlite: -# image: gitea/test_env:linux-amd64 -# environment: -# - USE_REPO_TEST_DIR=1 -# - GOPROXY=off -# - TAGS=bindata gogit sqlite sqlite_unlock_notify -# - TEST_TAGS=bindata gogit sqlite sqlite_unlock_notify -# commands: -# - su gitea -c 'timeout -s ABRT 120m make test-sqlite-migration test-sqlite' + test-sqlite: + image: gitea/test_env:linux-amd64 + environment: + - USE_REPO_TEST_DIR=1 + - GOPROXY=off + - TAGS=bindata gogit sqlite sqlite_unlock_notify + - TEST_TAGS=bindata gogit sqlite sqlite_unlock_notify + commands: + - su gitea -c 'timeout -s ABRT 120m make test-sqlite-migration test-sqlite'