diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2024-11-15 23:45:07 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-15 23:45:07 +0800 |
commit | ecbb03dc6d0e0565663dff977a4fc3d40a1e0c1e (patch) | |
tree | 662c4fe1755d323811c3fd3abcb81e256a86326e /.github/workflows | |
parent | a0c0cb3a2c426e39b91e7301c94ddc3a988c8607 (diff) | |
download | gitea-ecbb03dc6d0e0565663dff977a4fc3d40a1e0c1e.tar.gz gitea-ecbb03dc6d0e0565663dff977a4fc3d40a1e0c1e.zip |
Improve testing and try to fix MySQL hanging (#32515)
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
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/pull-db-tests.yml | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/.github/workflows/pull-db-tests.yml b/.github/workflows/pull-db-tests.yml index 22cb784245..0b23de0a66 100644 --- a/.github/workflows/pull-db-tests.yml +++ b/.github/workflows/pull-db-tests.yml @@ -154,12 +154,15 @@ jobs: runs-on: ubuntu-latest services: mysql: - image: mysql:8.0 + # the bitnami mysql image has more options than the official one, it's easier to customize + image: bitnami/mysql:8.0 env: - MYSQL_ALLOW_EMPTY_PASSWORD: true + ALLOW_EMPTY_PASSWORD: true MYSQL_DATABASE: testgitea ports: - "3306:3306" + options: >- + --mount type=tmpfs,destination=/bitnami/mysql/data elasticsearch: image: elasticsearch:7.5.0 env: @@ -188,7 +191,8 @@ jobs: - name: run migration tests run: make test-mysql-migration - name: run tests - run: make integration-test-coverage + # run: make integration-test-coverage (at the moment, no coverage is really handled) + run: make test-mysql env: TAGS: bindata RACE_ENABLED: true |