Skip to content

Commit a8731e5

Browse files
authored
Merge branch 'main' into main
2 parents c2f6275 + c87e6a8 commit a8731e5

File tree

1,977 files changed

+49578
-30433
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,977 files changed

+49578
-30433
lines changed

.air.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ bin = "gitea"
77
include_ext = ["go", "tmpl"]
88
exclude_dir = ["modules/git/tests", "services/gitdiff/testdata", "modules/avatar/testdata"]
99
include_dir = ["cmd", "models", "modules", "options", "routers", "services", "templates"]
10-
exclude_regex = ["_test.go$"]
10+
exclude_regex = ["_test.go$", "_gen.go$"]

.drone.yml

Lines changed: 119 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ volumes:
1919

2020
steps:
2121
- name: deps-frontend
22-
image: node:16
22+
image: node:18
2323
pull: always
2424
commands:
2525
- make deps-frontend
2626

2727
- name: deps-backend
28-
image: golang:1.18
28+
image: golang:1.19
2929
pull: always
3030
commands:
3131
- make deps-backend
@@ -34,11 +34,21 @@ steps:
3434
path: /go
3535

3636
- name: lint-frontend
37-
image: node:16
37+
image: node:18
3838
commands:
3939
- make lint-frontend
4040
depends_on: [deps-frontend]
4141

42+
- name: security-check
43+
image: golang:1.19
44+
pull: always
45+
commands:
46+
- make security-check
47+
depends_on: [deps-backend]
48+
volumes:
49+
- name: deps
50+
path: /go
51+
4252
- name: lint-backend
4353
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
4454
pull: always
@@ -82,13 +92,13 @@ steps:
8292
path: /go
8393

8494
- name: checks-frontend
85-
image: node:16
95+
image: node:18
8696
commands:
8797
- make checks-frontend
8898
depends_on: [deps-frontend]
8999

90100
- name: checks-backend
91-
image: golang:1.18
101+
image: golang:1.19
92102
commands:
93103
- make checks-backend
94104
depends_on: [deps-backend]
@@ -97,16 +107,21 @@ steps:
97107
path: /go
98108

99109
- name: test-frontend
100-
image: node:16
110+
image: node:18
101111
commands:
102112
- make test-frontend
103113
depends_on: [lint-frontend]
104114

115+
- name: generate-frontend
116+
image: golang:1.19
117+
commands:
118+
- make generate-frontend
119+
105120
- name: build-frontend
106-
image: node:16
121+
image: node:18
107122
commands:
108123
- make frontend
109-
depends_on: [test-frontend]
124+
depends_on: [deps-frontend, generate-frontend]
110125

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

124139
- name: build-backend-arm64
125-
image: golang:1.18
140+
image: golang:1.19
126141
environment:
127142
GO111MODULE: on
128143
GOPROXY: https://goproxy.io
@@ -138,7 +153,7 @@ steps:
138153
path: /go
139154

140155
- name: build-backend-windows
141-
image: golang:1.18
156+
image: golang:1.19
142157
environment:
143158
GO111MODULE: on
144159
GOPROXY: https://goproxy.io
@@ -153,7 +168,7 @@ steps:
153168
path: /go
154169

155170
- name: build-backend-386
156-
image: golang:1.18
171+
image: golang:1.19
157172
environment:
158173
GO111MODULE: on
159174
GOPROXY: https://goproxy.io
@@ -243,7 +258,7 @@ steps:
243258
- pull_request
244259

245260
- name: deps-backend
246-
image: golang:1.18
261+
image: golang:1.19
247262
pull: always
248263
commands:
249264
- make deps-backend
@@ -360,7 +375,7 @@ steps:
360375
path: /go
361376

362377
- name: generate-coverage
363-
image: golang:1.18
378+
image: golang:1.19
364379
commands:
365380
- make coverage
366381
environment:
@@ -436,7 +451,7 @@ steps:
436451
- pull_request
437452

438453
- name: deps-backend
439-
image: golang:1.18
454+
image: golang:1.19
440455
pull: always
441456
commands:
442457
- make deps-backend
@@ -498,6 +513,83 @@ steps:
498513
- name: deps
499514
path: /go
500515

516+
---
517+
kind: pipeline
518+
type: docker
519+
name: testing-e2e
520+
521+
platform:
522+
os: linux
523+
arch: amd64
524+
525+
depends_on:
526+
- compliance
527+
528+
trigger:
529+
event:
530+
- pull_request
531+
532+
volumes:
533+
- name: deps
534+
temp: {}
535+
536+
services:
537+
- name: pgsql
538+
pull: default
539+
image: postgres:10
540+
environment:
541+
POSTGRES_DB: testgitea-e2e
542+
POSTGRES_PASSWORD: postgres
543+
POSTGRES_INITDB_ARGS: --encoding=UTF8 --lc-collate='en_US.UTF-8' --lc-ctype='en_US.UTF-8'
544+
545+
steps:
546+
- name: deps-frontend
547+
image: node:18
548+
pull: always
549+
commands:
550+
- make deps-frontend
551+
552+
- name: generate-frontend
553+
image: golang:1.18
554+
commands:
555+
- make generate-frontend
556+
557+
- name: build-frontend
558+
image: node:18
559+
commands:
560+
- make frontend
561+
depends_on: [deps-frontend, generate-frontend]
562+
563+
- name: deps-backend
564+
image: golang:1.18
565+
pull: always
566+
commands:
567+
- make deps-backend
568+
volumes:
569+
- name: deps
570+
path: /go
571+
572+
# TODO: We should probably build all dependencies into a test image
573+
- name: test-e2e
574+
image: mcr.microsoft.com/playwright:v1.24.0-focal
575+
commands:
576+
- curl -sLO https://go.dev/dl/go1.18.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.18.linux-amd64.tar.gz
577+
- groupadd --gid 1001 gitea && useradd -m --gid 1001 --uid 1001 gitea
578+
- apt-get -qq update && apt-get -qqy install build-essential
579+
- export TEST_PGSQL_SCHEMA=''
580+
- ./build/test-env-prepare.sh
581+
- su gitea bash -c "export PATH=$PATH:/usr/local/go/bin && timeout -s ABRT 40m make test-e2e-pgsql"
582+
environment:
583+
GOPROXY: https://goproxy.io
584+
GOSUMDB: sum.golang.org
585+
USE_REPO_TEST_DIR: 1
586+
TEST_PGSQL_DBNAME: 'testgitea-e2e'
587+
DEBIAN_FRONTEND: noninteractive
588+
depends_on: [build-frontend, deps-backend]
589+
volumes:
590+
- name: deps
591+
path: /go
592+
501593
---
502594
kind: pipeline
503595
name: update_translations
@@ -578,7 +670,7 @@ trigger:
578670

579671
steps:
580672
- name: download
581-
image: golang:1.18
673+
image: golang:1.19
582674
pull: always
583675
commands:
584676
- timeout -s ABRT 40m make generate-license generate-gitignore
@@ -634,13 +726,13 @@ steps:
634726
- git fetch --tags --force
635727

636728
- name: deps-frontend
637-
image: node:16
729+
image: node:18
638730
pull: always
639731
commands:
640732
- make deps-frontend
641733

642734
- name: deps-backend
643-
image: golang:1.18
735+
image: golang:1.19
644736
pull: always
645737
commands:
646738
- make deps-backend
@@ -649,15 +741,17 @@ steps:
649741
path: /go
650742

651743
- name: static
652-
image: techknowlogick/xgo:go-1.18.x
744+
image: techknowlogick/xgo:go-1.19.x
653745
pull: always
654746
commands:
655-
- curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs
747+
# Upgrade to node 18 once https://github.com/techknowlogick/xgo/issues/163 is resolved
748+
- curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get -qqy install nodejs
656749
- export PATH=$PATH:$GOPATH/bin
657750
- make release
658751
environment:
659752
GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
660753
TAGS: bindata sqlite sqlite_unlock_notify
754+
DEBIAN_FRONTEND: noninteractive
661755
volumes:
662756
- name: deps
663757
path: /go
@@ -753,13 +847,13 @@ steps:
753847
- git fetch --tags --force
754848

755849
- name: deps-frontend
756-
image: node:16
850+
image: node:18
757851
pull: always
758852
commands:
759853
- make deps-frontend
760854

761855
- name: deps-backend
762-
image: golang:1.18
856+
image: golang:1.19
763857
pull: always
764858
commands:
765859
- make deps-backend
@@ -768,15 +862,17 @@ steps:
768862
path: /go
769863

770864
- name: static
771-
image: techknowlogick/xgo:go-1.18.x
865+
image: techknowlogick/xgo:go-1.19.x
772866
pull: always
773867
commands:
774-
- curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs
868+
# Upgrade to node 18 once https://github.com/techknowlogick/xgo/issues/163 is resolved
869+
- curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get -qqy install nodejs
775870
- export PATH=$PATH:$GOPATH/bin
776871
- make release
777872
environment:
778873
GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
779874
TAGS: bindata sqlite sqlite_unlock_notify
875+
DEBIAN_FRONTEND: noninteractive
780876
depends_on: [fetch-tags]
781877
volumes:
782878
- name: deps

.editorconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,3 @@ indent_style = tab
2626

2727
[*.svg]
2828
insert_final_newline = false
29-
30-
[*.md]
31-
trim_trailing_whitespace = false

0 commit comments

Comments
 (0)