aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/pull-db-tests.yml
Commit message (Collapse)AuthorAgeFilesLines
* Improve testing and try to fix MySQL hanging (#32515)wxiaoguang2024-11-151-3/+7
| | | | | | | | | | | | | | | | | | | | By some CI fine tunes (`run tests`), SQLite & MSSQL could complete in about 12~13 minutes (before > 14), MySQL could complete in 18 minutes (before: about 23 or even > 30) Major changes: 1. use tmpfs for MySQL storage 1. run `make test-mysql` instead of `make integration-test-coverage` because the code coverage is not really used at the moment. 1. refactor testlogger to make it more reliable and be able to report stuck stacktrace 1. do not requeue failed items when a queue is being flushed (failed items would keep failing and make flush uncompleted) 1. reduce the file sizes for testing 1. use math ChaCha20 random data instead of crypot/rand (for testing purpose only) 1. no need to `DeleteRepository` in `TestLinguist` 1. other related refactoring to make code easier to maintain
* use rebuilt mssql-2017 image (#32109)techknowlogick2024-09-231-3/+4
|
* Only use Host header from reverse proxy (#32060)wxiaoguang2024-09-201-1/+2
| | | | | | | | | X-Forwarded-Host has many problems: non-standard, not well-defined (X-Forwarded-Port or not), conflicts with Host header, it already caused problems like #31907. So do not use X-Forwarded-Host, just use Host header directly. Official document also only uses `Host` header and never mentioned others.
* Azure blob storage support (#30995)Lunny Xiao2024-05-301-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | This PR implemented object storages(LFS/Packages/Attachments and etc.) for Azure Blob Storage. It depends on azure official golang SDK and can support both the azure blob storage cloud service and azurite mock server. Replace #25458 Fix #22527 - [x] CI Tests - [x] integration test, MSSQL integration tests will now based on azureblob - [x] unit test - [x] CLI Migrate Storage - [x] Documentation for configuration added ------ TODO (other PRs): - [ ] Improve performance of `blob download`. --------- Co-authored-by: yp05327 <576951401@qq.com>
* Fix bug hidden on CI and make ci failed if tests failure (#29254)Lunny Xiao2024-03-071-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | The tests on migration tests failed but CI reports successfully https://github.com/go-gitea/gitea/actions/runs/7364373807/job/20044685969#step:8:141 This PR will fix the bug on migration v283 and also the CI hidden behaviour. The reason is on the Makefile `GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini $(GO) test $(GOTESTFLAGS) -tags='$(TEST_TAGS)' $(MIGRATE_TEST_PACKAGES)` will return the error exit code. But `for pkg in $(shell $(GO) list code.gitea.io/gitea/models/migrations/...); do \ GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini $(GO) test $(GOTESTFLAGS) -tags '$(TEST_TAGS)' $$pkg; \ done` will not work. This also fix #29602
* Revert "Support SAML authentication (#25165)" (#29358)65432024-02-241-8/+0
| | | | | | | | | | This reverts #25165 (5bb8d1924d77c675467694de26697b876d709a17), as there was a chance some important reviews got missed. so after reverting this patch it will be resubmitted for reviewing again https://github.com/go-gitea/gitea/pull/25165#issuecomment-1960670242 temporary Open #5512 again
* Support SAML authentication (#25165)techknowlogick2024-02-231-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes https://github.com/go-gitea/gitea/issues/5512 This PR adds basic SAML support - Adds SAML 2.0 as an auth source - Adds SAML configuration documentation - Adds integration test: - Use bare-bones SAML IdP to test protocol flow and test account is linked successfully (only runs on Postgres by default) - Adds documentation for configuring and running SAML integration test locally Future PRs: - Support group mapping - Support auto-registration (account linking) Co-Authored-By: @jackHay22 --------- Co-authored-by: jackHay22 <jack@allspice.io> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: KN4CK3R <admin@oldschoolhack.me> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Jason Song <i@wolfogre.com> Co-authored-by: morphelinho <morphelinho@users.noreply.github.com> Co-authored-by: Zettat123 <zettat123@gmail.com> Co-authored-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: silverwind <me@silverwind.io>
* feat: bump `dessant/lock-threads` and `actions/setup-go` to use nodejs20 ↵Rui Chen2023-12-211-5/+5
| | | | | | | | | | | | | | runtime (#28565) Update more actions to use nodejs20 runtime and also update the docs for checkout action usage. similar to: - #27836 - #27096 --------- Signed-off-by: Rui Chen <rui@chenrui.dev>
* actions/setup-go use go-version-file (#27651)Yevhen Pavlov2023-10-171-5/+5
| | | | These changes will allow not to specify the version of go in every pipeline.
* Use minimal required version on CI and remove unnecessary services (#27429)Lunny Xiao2023-10-041-17/+3
|
* Require MySQL 8.0, PostgreSQL 12, MSSQL 2012 (#27337)silverwind2023-10-031-36/+6
| | | | | | | | | | | | | | | | | | | | | | | - MySQL 5.7 support and testing is dropped - MySQL tests now execute against 8.1, up from 5.7 and 8.0 - PostgreSQL 10 and 11 support ist dropped - PostgreSQL tests now execute against 16, up from 15 - MSSQL 2008 support is dropped - MSSQL tests now run against locked 2022 version Fixes: https://github.com/go-gitea/gitea/issues/25657 Ref: https://endoflife.date/mysql Ref: https://endoflife.date/postgresql Ref: https://endoflife.date/mssqlserver ## :warning: BREAKING :warning: Support for MySQL 5.7, PostgreSQL 10 and 11, and MSSQL 2008 is dropped. You are encouraged to upgrade to supported versions. --------- Co-authored-by: techknowlogick <techknowlogick@gitea.com>
* verify MinIO works with bitnami/minio:2023.8.31 (#27022)Earl Warren2023-10-031-3/+3
|
* Upgrading the actions/checkout@4 (#27096)puni98692023-09-161-6/+6
| | | | | | | as title ..Upgrading the actions/checkout@4 Signed-off-by: puni9869 <punitinani1@hotmail.com> Co-authored-by: silverwind <me@silverwind.io>
* Add `yamllint` (#26965)silverwind2023-09-071-3/+3
| | | | | | | | | So that https://github.com/go-gitea/gitea/pull/26964 does not happen again. Merge this after that PR. Config is based on [node's](https://github.com/nodejs/node/blob/main/.yamllint.yaml). --------- Co-authored-by: techknowlogick <techknowlogick@gitea.com>
* Lock go to 1.21 on CI (#26433)silverwind2023-08-101-6/+6
| | | | | | | To prevent unwanted surprises with new minor versions of go, lock the version to minor version using [semver tilde syntax](https://github.com/npm/node-semver#tilde-ranges-123-12-1). We were already getting 1.21.0 since yesterday, so use that version now as minimum.
* Refactor and enhance issue indexer to support both searching, filtering and ↵Jason Song2023-07-311-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | paging (#26012) Fix #24662. Replace #24822 and #25708 (although it has been merged) ## Background In the past, Gitea supported issue searching with a keyword and conditions in a less efficient way. It worked by searching for issues with the keyword and obtaining limited IDs (as it is heavy to get all) on the indexer (bleve/elasticsearch/meilisearch), and then querying with conditions on the database to find a subset of the found IDs. This is why the results could be incomplete. To solve this issue, we need to store all fields that could be used as conditions in the indexer and support both keyword and additional conditions when searching with the indexer. ## Major changes - Redefine `IndexerData` to include all fields that could be used as filter conditions. - Refactor `Search(ctx context.Context, kw string, repoIDs []int64, limit, start int, state string)` to `Search(ctx context.Context, options *SearchOptions)`, so it supports more conditions now. - Change the data type stored in `issueIndexerQueue`. Use `IndexerMetadata` instead of `IndexerData` in case the data has been updated while it is in the queue. This also reduces the storage size of the queue. - Enhance searching with Bleve/Elasticsearch/Meilisearch, make them fully support `SearchOptions`. Also, update the data versions. - Keep most logic of database indexer, but remove `issues.SearchIssueIDsByKeyword` in `models` to avoid confusion where is the entry point to search issues. - Start a Meilisearch instance to test it in unit tests. - Add unit tests with almost full coverage to test Bleve/Elasticsearch/Meilisearch indexer. --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* GitHub Actions enhancements for frontend (#25150)silverwind2023-06-141-6/+6
| | | | | - Don't run DB tests for frontend-only changes - Build frontend as part of frontend step - Build everything when actions change
* Fix setup-go actions (#25167)silverwind2023-06-091-6/+12
| | | | | | | | | | | | | | | | | | The `setup-go` actions did not all have `check-latest` which means they use some cached version of go that currently still resolves to go1.20.4, as seen in a number of recent runs that currently fail at govulncheck because of it: ```` Run actions/setup-go@v4 Setup go version spec >=1.20 Attempting to resolve the latest version from the manifest... matching >=1.20... Resolved as '1.20.4' ```` Add the [check-latest](https://github.com/actions/setup-go#check-latest-version) option which should guarantee that this cache is skipped.
* Use file filters action instead of Github's files filter (#24877)Lunny Xiao2023-05-251-3/+15
| | | | | | | | | | | | | | | Inspired by https://github.com/go-gitea/gitea/pull/24530#issuecomment-1558815301 This PR use a file filter action to do different CI jobs according changed files types. All types are defined in `.github/file-filters.yml`. Now there are 4 types, `docs`, `backend`, `frontend` and `build`. Then if a PR only changed docs files, those CI jobs which passed the conditions will run, and other types are also like this. --------- Co-authored-by: silverwind <me@silverwind.io>
* replace `drone exec` to `act_runner exec` in test README.md (#24791)a10121127962023-05-181-5/+5
|
* Don't run build and test if only docs changed (#24530)Lunny Xiao2023-05-161-1/+5
| | | Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* fix minio storage iterator path (#24691)FuXiaoHei2023-05-131-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | minio storage iterator shows different behavior with local fs iterator. in local fs storage: ``` go s.IterateObjects("prefix", func(path,obj) println(path) // show "prefix/xxx.file" }) ``` in minio storage: ```go s.IterateObjects("prefix", func(path,obj) println(path) // show "xxx.file" }) ``` I think local fs is correct, minio use wrong `basePath` to trim storage path prefix. --------- Co-authored-by: Giteabot <teabot@gitea.io>
* GitHub Actions cleanups (#24620)silverwind2023-05-111-0/+224
- Remove actions name where command is descriptive enough - Use kebab-case instead of snake-case for step names - Use shorter job names because to make PR checks more readable - Remove duplicate `checks-backend` --------- Co-authored-by: Yarden Shoham <git@yardenshoham.com>