Skip to content

Commit ccd705d

Browse files
committed
Merge remote-tracking branch 'upstream/main'
* upstream/main: (22 commits) [skip ci] Updated translations via Crowdin Webhook for Wiki changes (go-gitea#20219) test: use `T.TempDir` to create temporary test directory (go-gitea#21043) Set uploadpack.allowFilter etc on gitea serv to enable partial clones with ssh (go-gitea#20902) Fix 500 on time tracking in timeline API (go-gitea#21052) Add more checks in migration code (go-gitea#21011) Fill the specified ref in webhook test payload (go-gitea#20961) [skip ci] Updated licenses and gitignores Add go licenses to licenses.txt (go-gitea#21034) Added docs for agit-setup (go-gitea#21027) Add another index for Action table on postgres (go-gitea#21033) Delete unreferenced packages when deleting a package version (go-gitea#20977) Improve arc-green code theme (go-gitea#21039) Add down key check has tribute container (go-gitea#21016) Do not add links to Posters or Assignees with ID < 0 (go-gitea#20577) [skip ci] Updated translations via Crowdin Show language name on hover (go-gitea#20923) fix: PackageMetadataVersion deps (go-gitea#21017) Fix the quick-submit for pending review comment (go-gitea#20992) Kd/ci playwright go test (go-gitea#20123) ...
2 parents d823577 + 0232601 commit ccd705d

File tree

780 files changed

+6283
-1989
lines changed

Some content is hidden

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

780 files changed

+6283
-1989
lines changed

.drone.yml

Lines changed: 76 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@ steps:
9090
- name: checks-backend
9191
image: golang:1.19
9292
commands:
93+
- curl -sL https://deb.nodesource.com/setup_18.x | bash - && apt-get -qqy install nodejs
9394
- make checks-backend
95+
environment:
96+
DEBIAN_FRONTEND: noninteractive
9497
depends_on: [deps-backend]
9598
volumes:
9699
- name: deps
@@ -498,6 +501,75 @@ steps:
498501
- name: deps
499502
path: /go
500503

504+
---
505+
kind: pipeline
506+
type: docker
507+
name: testing-e2e
508+
509+
platform:
510+
os: linux
511+
arch: amd64
512+
513+
depends_on:
514+
- compliance
515+
516+
trigger:
517+
event:
518+
- pull_request
519+
520+
volumes:
521+
- name: deps
522+
temp: {}
523+
524+
services:
525+
- name: pgsql
526+
pull: default
527+
image: postgres:10
528+
environment:
529+
POSTGRES_DB: testgitea-e2e
530+
POSTGRES_PASSWORD: postgres
531+
POSTGRES_INITDB_ARGS: --encoding=UTF8 --lc-collate='en_US.UTF-8' --lc-ctype='en_US.UTF-8'
532+
533+
steps:
534+
- name: deps-frontend
535+
image: node:16
536+
pull: always
537+
commands:
538+
- make deps-frontend
539+
540+
- name: build-frontend
541+
image: node:16
542+
commands:
543+
- make frontend
544+
depends_on: [deps-frontend]
545+
546+
- name: deps-backend
547+
image: golang:1.18
548+
pull: always
549+
commands:
550+
- make deps-backend
551+
volumes:
552+
- name: deps
553+
path: /go
554+
555+
# TODO: We should probably build all dependencies into a test image
556+
- name: test-e2e
557+
image: mcr.microsoft.com/playwright:v1.23.1-focal
558+
commands:
559+
- curl -sLO https://go.dev/dl/go1.18.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.18.linux-amd64.tar.gz
560+
- groupadd --gid 1001 gitea && useradd -m --gid 1001 --uid 1001 gitea
561+
- apt-get -qq update && apt-get -qqy install build-essential
562+
- export TEST_PGSQL_SCHEMA=''
563+
- ./build/test-env-prepare.sh
564+
- su gitea bash -c "export PATH=$PATH:/usr/local/go/bin && timeout -s ABRT 40m make test-e2e-pgsql"
565+
environment:
566+
GOPROXY: https://goproxy.io
567+
GOSUMDB: sum.golang.org
568+
USE_REPO_TEST_DIR: 1
569+
TEST_PGSQL_DBNAME: 'testgitea-e2e'
570+
DEBIAN_FRONTEND: noninteractive
571+
depends_on: [build-frontend, deps-backend]
572+
501573
---
502574
kind: pipeline
503575
name: update_translations
@@ -653,12 +725,13 @@ steps:
653725
pull: always
654726
commands:
655727
# Upgrade to node 18 once https://github.com/techknowlogick/xgo/issues/163 is resolved
656-
- curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs
728+
- curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get -qqy install nodejs
657729
- export PATH=$PATH:$GOPATH/bin
658730
- make release
659731
environment:
660732
GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
661733
TAGS: bindata sqlite sqlite_unlock_notify
734+
DEBIAN_FRONTEND: noninteractive
662735
volumes:
663736
- name: deps
664737
path: /go
@@ -773,12 +846,13 @@ steps:
773846
pull: always
774847
commands:
775848
# Upgrade to node 18 once https://github.com/techknowlogick/xgo/issues/163 is resolved
776-
- curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs
849+
- curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get -qqy install nodejs
777850
- export PATH=$PATH:$GOPATH/bin
778851
- make release
779852
environment:
780853
GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not
781854
TAGS: bindata sqlite sqlite_unlock_notify
855+
DEBIAN_FRONTEND: noninteractive
782856
depends_on: [fetch-tags]
783857
volumes:
784858
- name: deps

.gitignore

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -63,21 +63,14 @@ cpu.out
6363
/indexers
6464
/log
6565
/public/img/avatar
66-
/integrations/gitea-integration-mysql
67-
/integrations/gitea-integration-mysql8
68-
/integrations/gitea-integration-pgsql
69-
/integrations/gitea-integration-sqlite
70-
/integrations/gitea-integration-mssql
71-
/integrations/indexers-mysql
72-
/integrations/indexers-mysql8
73-
/integrations/indexers-pgsql
74-
/integrations/indexers-sqlite
75-
/integrations/indexers-mssql
76-
/integrations/sqlite.ini
77-
/integrations/mysql.ini
78-
/integrations/mysql8.ini
79-
/integrations/pgsql.ini
80-
/integrations/mssql.ini
66+
/tests/integration/gitea-integration-*
67+
/tests/integration/indexers-*
68+
/tests/e2e/gitea-e2e-*
69+
/tests/e2e/indexers-*
70+
/tests/e2e/reports
71+
/tests/e2e/test-artifacts
72+
/tests/e2e/test-snapshots
73+
/tests/*.ini
8174
/node_modules
8275
/yarn.lock
8376
/yarn-error.log
@@ -102,6 +95,7 @@ cpu.out
10295
!/web_src/fomantic/build/themes/default/assets/fonts/outline-icons.woff2
10396
/VERSION
10497
/.air
98+
/.go-licenses
10599

106100
# Snapcraft
107101
snap/.snapcraft/

CONTRIBUTING.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,10 @@ Here's how to run the test suite:
8686
| | |
8787
| :------------------------------------- | :----------------------------------------------- |
8888
|``make test[\#TestSpecificName]`` | run unit test |
89-
|``make test-sqlite[\#TestSpecificName]``| run [integration](integrations) test for SQLite |
90-
|[More details about integrations](integrations/README.md) |
89+
|``make test-sqlite[\#TestSpecificName]``| run [integration](tests/integration) test for SQLite |
90+
|[More details about integration tests](tests/integration/README.md) |
91+
|``make test-e2e-sqlite[\#TestSpecificFileName]``| run [end-to-end](tests/e2e) test for SQLite |
92+
|[More details about e2e tests](tests/e2e/README.md) |
9193

9294
## Vendoring
9395

@@ -168,7 +170,7 @@ import (
168170

169171
To maintain understandable code and avoid circular dependencies it is important to have a good structure of the code. The Gitea code is divided into the following parts:
170172

171-
- **integration:** Integrations tests
173+
- **integration:** Integration tests
172174
- **models:** Contains the data structures used by xorm to construct database tables. It also contains supporting functions to query and update the database. Dependencies to other code in Gitea should be avoided although some modules might be needed (for example for logging).
173175
- **models/fixtures:** Sample model data used in integration tests.
174176
- **models/migrations:** Handling of database migrations between versions. PRs that changes a database structure shall also have a migration step.

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,4 @@ Gusted <[email protected]) (@Gusted)
4848
silentcode <[email protected]> (@silentcodeg)
4949
Wim <[email protected]> (@42wim)
5050
xinyu <[email protected]> (@penlinux)
51+
Jason Song <[email protected]> (@wolfogre)

0 commit comments

Comments
 (0)