Skip to content

Commit

Permalink
Merge branch 'go-gitea:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
neonn committed Sep 9, 2022
2 parents 88b271a + b5d21c0 commit 54273e5
Show file tree
Hide file tree
Showing 1,953 changed files with 48,088 additions and 29,703 deletions.
2 changes: 1 addition & 1 deletion .air.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ bin = "gitea"
include_ext = ["go", "tmpl"]
exclude_dir = ["modules/git/tests", "services/gitdiff/testdata", "modules/avatar/testdata"]
include_dir = ["cmd", "models", "modules", "options", "routers", "services", "templates"]
exclude_regex = ["_test.go$"]
exclude_regex = ["_test.go$", "_gen.go$"]
132 changes: 109 additions & 23 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ volumes:

steps:
- name: deps-frontend
image: node:16
image: node:18
pull: always
commands:
- make deps-frontend

- name: deps-backend
image: golang:1.18
image: golang:1.19
pull: always
commands:
- make deps-backend
Expand All @@ -34,7 +34,7 @@ steps:
path: /go

- name: lint-frontend
image: node:16
image: node:18
commands:
- make lint-frontend
depends_on: [deps-frontend]
Expand Down Expand Up @@ -82,13 +82,13 @@ steps:
path: /go

- name: checks-frontend
image: node:16
image: node:18
commands:
- make checks-frontend
depends_on: [deps-frontend]

- name: checks-backend
image: golang:1.18
image: golang:1.19
commands:
- make checks-backend
depends_on: [deps-backend]
Expand All @@ -97,16 +97,21 @@ steps:
path: /go

- name: test-frontend
image: node:16
image: node:18
commands:
- make test-frontend
depends_on: [lint-frontend]

- name: generate-frontend
image: golang:1.19
commands:
- make generate-frontend

- name: build-frontend
image: node:16
image: node:18
commands:
- make frontend
depends_on: [test-frontend]
depends_on: [deps-frontend, generate-frontend]

- name: build-backend-no-gcc
image: golang:1.18 # this step is kept as the lowest version of golang that we support
Expand All @@ -122,7 +127,7 @@ steps:
path: /go

- name: build-backend-arm64
image: golang:1.18
image: golang:1.19
environment:
GO111MODULE: on
GOPROXY: https://goproxy.io
Expand All @@ -138,7 +143,7 @@ steps:
path: /go

- name: build-backend-windows
image: golang:1.18
image: golang:1.19
environment:
GO111MODULE: on
GOPROXY: https://goproxy.io
Expand All @@ -153,7 +158,7 @@ steps:
path: /go

- name: build-backend-386
image: golang:1.18
image: golang:1.19
environment:
GO111MODULE: on
GOPROXY: https://goproxy.io
Expand Down Expand Up @@ -243,7 +248,7 @@ steps:
- pull_request

- name: deps-backend
image: golang:1.18
image: golang:1.19
pull: always
commands:
- make deps-backend
Expand Down Expand Up @@ -360,7 +365,7 @@ steps:
path: /go

- name: generate-coverage
image: golang:1.18
image: golang:1.19
commands:
- make coverage
environment:
Expand Down Expand Up @@ -436,7 +441,7 @@ steps:
- pull_request

- name: deps-backend
image: golang:1.18
image: golang:1.19
pull: always
commands:
- make deps-backend
Expand Down Expand Up @@ -498,6 +503,83 @@ steps:
- name: deps
path: /go

---
kind: pipeline
type: docker
name: testing-e2e

platform:
os: linux
arch: amd64

depends_on:
- compliance

trigger:
event:
- pull_request

volumes:
- name: deps
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:
- name: deps-frontend
image: node:18
pull: always
commands:
- make deps-frontend

- name: generate-frontend
image: golang:1.18
commands:
- make generate-frontend

- name: build-frontend
image: node:18
commands:
- make frontend
depends_on: [deps-frontend, generate-frontend]

- name: deps-backend
image: golang:1.18
pull: always
commands:
- make deps-backend
volumes:
- name: deps
path: /go

# TODO: We should probably build all dependencies into a test image
- name: test-e2e
image: mcr.microsoft.com/playwright:v1.24.0-focal
commands:
- curl -sLO https://go.dev/dl/go1.18.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.18.linux-amd64.tar.gz
- groupadd --gid 1001 gitea && useradd -m --gid 1001 --uid 1001 gitea
- apt-get -qq update && apt-get -qqy install build-essential
- export TEST_PGSQL_SCHEMA=''
- ./build/test-env-prepare.sh
- su gitea bash -c "export PATH=$PATH:/usr/local/go/bin && timeout -s ABRT 40m make test-e2e-pgsql"
environment:
GOPROXY: https://goproxy.io
GOSUMDB: sum.golang.org
USE_REPO_TEST_DIR: 1
TEST_PGSQL_DBNAME: 'testgitea-e2e'
DEBIAN_FRONTEND: noninteractive
depends_on: [build-frontend, deps-backend]
volumes:
- name: deps
path: /go

---
kind: pipeline
name: update_translations
Expand Down Expand Up @@ -578,7 +660,7 @@ trigger:

steps:
- name: download
image: golang:1.18
image: golang:1.19
pull: always
commands:
- timeout -s ABRT 40m make generate-license generate-gitignore
Expand Down Expand Up @@ -634,13 +716,13 @@ steps:
- git fetch --tags --force

- name: deps-frontend
image: node:16
image: node:18
pull: always
commands:
- make deps-frontend

- name: deps-backend
image: golang:1.18
image: golang:1.19
pull: always
commands:
- make deps-backend
Expand All @@ -649,15 +731,17 @@ steps:
path: /go

- name: static
image: techknowlogick/xgo:go-1.18.x
image: techknowlogick/xgo:go-1.19.x
pull: always
commands:
- curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs
# Upgrade to node 18 once https://github.com/techknowlogick/xgo/issues/163 is resolved
- curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get -qqy install nodejs
- export PATH=$PATH:$GOPATH/bin
- make release
environment:
GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
TAGS: bindata sqlite sqlite_unlock_notify
DEBIAN_FRONTEND: noninteractive
volumes:
- name: deps
path: /go
Expand Down Expand Up @@ -753,13 +837,13 @@ steps:
- git fetch --tags --force

- name: deps-frontend
image: node:16
image: node:18
pull: always
commands:
- make deps-frontend

- name: deps-backend
image: golang:1.18
image: golang:1.19
pull: always
commands:
- make deps-backend
Expand All @@ -768,15 +852,17 @@ steps:
path: /go

- name: static
image: techknowlogick/xgo:go-1.18.x
image: techknowlogick/xgo:go-1.19.x
pull: always
commands:
- curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs
# Upgrade to node 18 once https://github.com/techknowlogick/xgo/issues/163 is resolved
- curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get -qqy install nodejs
- export PATH=$PATH:$GOPATH/bin
- make release
environment:
GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
TAGS: bindata sqlite sqlite_unlock_notify
DEBIAN_FRONTEND: noninteractive
depends_on: [fetch-tags]
volumes:
- name: deps
Expand Down
3 changes: 0 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,3 @@ indent_style = tab

[*.svg]
insert_final_newline = false

[*.md]
trim_trailing_whitespace = false
Loading

0 comments on commit 54273e5

Please sign in to comment.