mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-05 21:44:57 +00:00
This PR contains the following updates: | Package | Type | Update | Change | Pending | |---|---|---|---|---| | [bitnamilegacy/minio](https://redirect.github.com/bitnami/containers) ([source](https://redirect.github.com/bitnami/containers/tree/HEAD/bitnami/minio)) | service | minor | `2021.3.17` → `2021.12.29` | | | [bitnamilegacy/minio](https://redirect.github.com/bitnami/containers) ([source](https://redirect.github.com/bitnami/containers/tree/HEAD/bitnami/minio)) | service | minor | `2023.8.31` → `2023.12.23` | | | [bitnamilegacy/mysql](https://redirect.github.com/bitnami/containers) ([source](https://redirect.github.com/bitnami/containers/tree/HEAD/bitnami/mysql)) | service | minor | `8.0` → `8.4` | | | [renovatebot/github-action](https://redirect.github.com/renovatebot/github-action) | action | patch | `v46.1.10` → `v46.1.12` | `v46.1.13` | --- ### Release Notes <details> <summary>renovatebot/github-action (renovatebot/github-action)</summary> ### [`v46.1.12`](https://redirect.github.com/renovatebot/github-action/releases/tag/v46.1.12) [Compare Source](https://redirect.github.com/renovatebot/github-action/compare/v46.1.11...v46.1.12) ##### Bug Fixes - **deps:** update dependency [@​actions/core](https://redirect.github.com/actions/core) to v3.0.1 ([e8a6055](e8a6055d6d)) ##### Documentation - update references to renovatebot/github-action to v46.1.11 ([317011a](317011a6ef)) ##### Miscellaneous Chores - **deps:** update dependency typescript-eslint to v8.59.0 ([8e3560a](8e3560ab95)) ##### Continuous Integration - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.142.0 ([0fee00d](0fee00dc59)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.142.1 ([c7cfc88](c7cfc88250)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.144.0 ([39e7d09](39e7d09c7b)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.145.0 ([0bbd415](0bbd415a9c)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.146.0 ([889c739](889c7399ca)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.147.0 ([7addce6](7addce6f1e)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.150.0 ([804ce16](804ce1618f)) ### [`v46.1.11`](https://redirect.github.com/renovatebot/github-action/releases/tag/v46.1.11) [Compare Source](https://redirect.github.com/renovatebot/github-action/compare/v46.1.10...v46.1.11) ##### Documentation - update references to renovatebot/github-action to v46.1.10 ([0b264d2](0b264d27f8)) ##### Miscellaneous Chores - **deps:** update actions/setup-node action to v6.4.0 ([951a814](951a81487a)) - **deps:** update dependency prettier to v3.8.3 ([a763833](a763833a7d)) - **deps:** update dependency typescript-eslint to v8.58.2 ([119d68e](119d68e8f6)) ##### Build System - **deps:** lock file maintenance ([f82feed](f82feedb56)) ##### Continuous Integration - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.132.3 ([99cc805](99cc805d75)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.133.0 ([a63d39b](a63d39be1e)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.135.0 ([955b000](955b0000ba)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.136.0 ([65167cd](65167cdb3f)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.136.1 ([7b21b86](7b21b86ced)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.136.3 ([28a2dc0](28a2dc07b8)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.137.0 ([b0cf2a4](b0cf2a4c91)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.138.0 ([3700882](3700882c45)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.138.1 ([f516ce2](f516ce2f92)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.138.3 ([3411548](3411548d9c)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.139.0 ([5201886](5201886b45)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.139.1 ([5856263](5856263af8)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.139.4 ([999691d](999691d7f3)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.139.5 ([f703a54](f703a54130)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.139.6 ([3ba85c2](3ba85c2979)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.139.7 ([96f2f09](96f2f09b9d)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.139.8 ([5af45e5](5af45e5b84)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.140.0 ([01e9139](01e91393d3)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.141.0 ([814a2a4](814a2a47c0)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.141.1 ([fb3abdf](fb3abdf7fa)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.141.2 ([e3a9af5](e3a9af55ac)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.141.5 ([4f14b2f](4f14b2f81d)) - **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.141.6 ([2357784](2357784955)) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - Only on Monday (`* * * * 1`) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://redirect.github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xNDEuNSIsInVwZGF0ZWRJblZlciI6IjQzLjE0MS41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->
260 lines
8.5 KiB
YAML
260 lines
8.5 KiB
YAML
name: db-tests
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
files-changed:
|
|
uses: ./.github/workflows/files-changed.yml
|
|
|
|
test-pgsql:
|
|
if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true'
|
|
needs: files-changed
|
|
runs-on: ubuntu-latest
|
|
services:
|
|
pgsql:
|
|
image: postgres:14
|
|
env:
|
|
POSTGRES_DB: test
|
|
POSTGRES_PASSWORD: postgres
|
|
ports:
|
|
- "5432:5432"
|
|
ldap:
|
|
image: gitea/test-openldap:latest
|
|
ports:
|
|
- "389:389"
|
|
- "636:636"
|
|
minio:
|
|
# as github actions doesn't support "entrypoint", we need to use a non-official image
|
|
# that has a custom entrypoint set to "minio server /data"
|
|
image: bitnamilegacy/minio:2023.12.23
|
|
env:
|
|
MINIO_ROOT_USER: 123456
|
|
MINIO_ROOT_PASSWORD: 12345678
|
|
ports:
|
|
- "9000:9000"
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
|
|
with:
|
|
go-version-file: go.mod
|
|
check-latest: true
|
|
cache: false
|
|
- uses: ./.github/actions/go-cache
|
|
with:
|
|
cache-name: pgsql
|
|
- name: Add hosts to /etc/hosts
|
|
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 pgsql ldap minio" | sudo tee -a /etc/hosts'
|
|
- run: make deps-backend
|
|
- run: make backend
|
|
env:
|
|
TAGS: bindata
|
|
- name: run migration tests
|
|
run: GITEA_TEST_DATABASE=pgsql make test-migration
|
|
- name: run tests
|
|
run: GITEA_TEST_DATABASE=pgsql make test-integration
|
|
timeout-minutes: 50
|
|
env:
|
|
TAGS: bindata gogit
|
|
TEST_LDAP: 1
|
|
|
|
test-sqlite:
|
|
if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true'
|
|
needs: files-changed
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
|
|
with:
|
|
go-version-file: go.mod
|
|
check-latest: true
|
|
cache: false
|
|
- uses: ./.github/actions/go-cache
|
|
with:
|
|
cache-name: sqlite
|
|
- run: make deps-backend
|
|
- run: make backend
|
|
env:
|
|
TAGS: bindata gogit sqlite sqlite_unlock_notify
|
|
GOEXPERIMENT:
|
|
- name: run migration tests
|
|
run: GITEA_TEST_DATABASE=sqlite make test-migration
|
|
env:
|
|
TAGS: bindata gogit
|
|
- name: run tests
|
|
run: GITEA_TEST_DATABASE=sqlite make test-integration
|
|
timeout-minutes: 50
|
|
env:
|
|
TAGS: bindata gogit
|
|
GOEXPERIMENT:
|
|
GOTEST_FLAGS: -race -timeout=40m
|
|
|
|
test-unit:
|
|
if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true'
|
|
needs: files-changed
|
|
runs-on: ubuntu-latest
|
|
services:
|
|
elasticsearch:
|
|
image: docker.elastic.co/elasticsearch/elasticsearch:8.19.14
|
|
env:
|
|
discovery.type: single-node
|
|
xpack.security.enabled: false
|
|
ports:
|
|
- "9200:9200"
|
|
meilisearch:
|
|
image: getmeili/meilisearch:v1
|
|
env:
|
|
MEILI_ENV: development # disable auth
|
|
ports:
|
|
- "7700:7700"
|
|
redis:
|
|
image: redis
|
|
options: >- # wait until redis has started
|
|
--health-cmd "redis-cli ping"
|
|
--health-interval 5s
|
|
--health-timeout 3s
|
|
--health-retries 10
|
|
ports:
|
|
- 6379:6379
|
|
minio:
|
|
image: bitnamilegacy/minio:2021.12.29
|
|
env:
|
|
MINIO_ACCESS_KEY: 123456
|
|
MINIO_SECRET_KEY: 12345678
|
|
ports:
|
|
- "9000:9000"
|
|
devstoreaccount1.azurite.local: # https://github.com/Azure/Azurite/issues/1583
|
|
image: mcr.microsoft.com/azure-storage/azurite:latest
|
|
ports:
|
|
- 10000:10000
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
|
|
with:
|
|
go-version-file: go.mod
|
|
check-latest: true
|
|
cache: false
|
|
- uses: ./.github/actions/go-cache
|
|
with:
|
|
cache-name: unit
|
|
build-cache-rotate: "true"
|
|
- name: Add hosts to /etc/hosts
|
|
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 minio devstoreaccount1.azurite.local mysql elasticsearch meilisearch smtpimap" | sudo tee -a /etc/hosts'
|
|
- run: make deps-backend
|
|
- run: make backend
|
|
env:
|
|
TAGS: bindata
|
|
- name: unit-tests
|
|
run: make test-backend test-check
|
|
env:
|
|
TAGS: bindata sqlite sqlite_unlock_notify
|
|
GOTEST_FLAGS: -race -timeout=20m
|
|
GITHUB_READ_TOKEN: ${{ secrets.GITHUB_READ_TOKEN }}
|
|
- name: unit-tests-gogit
|
|
run: make test-backend test-check
|
|
env:
|
|
TAGS: bindata gogit sqlite sqlite_unlock_notify
|
|
GOEXPERIMENT:
|
|
GOTEST_FLAGS: -race -timeout=20m
|
|
GITHUB_READ_TOKEN: ${{ secrets.GITHUB_READ_TOKEN }}
|
|
|
|
test-mysql:
|
|
if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true'
|
|
needs: files-changed
|
|
runs-on: ubuntu-latest
|
|
services:
|
|
mysql:
|
|
# the bitnami mysql image has more options than the official one, it's easier to customize
|
|
image: bitnamilegacy/mysql:8.4
|
|
env:
|
|
ALLOW_EMPTY_PASSWORD: true
|
|
MYSQL_DATABASE: testgitea
|
|
ports:
|
|
- "3306:3306"
|
|
options: >-
|
|
--mount type=tmpfs,destination=/bitnami/mysql/data
|
|
elasticsearch:
|
|
image: docker.elastic.co/elasticsearch/elasticsearch:8.19.14
|
|
env:
|
|
discovery.type: single-node
|
|
xpack.security.enabled: false
|
|
ports:
|
|
- "9200:9200"
|
|
smtpimap:
|
|
image: tabascoterrier/docker-imap-devel:latest
|
|
ports:
|
|
- "25:25"
|
|
- "143:143"
|
|
- "587:587"
|
|
- "993:993"
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
|
|
with:
|
|
go-version-file: go.mod
|
|
check-latest: true
|
|
cache: false
|
|
- uses: ./.github/actions/go-cache
|
|
with:
|
|
cache-name: mysql
|
|
- name: Add hosts to /etc/hosts
|
|
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mysql elasticsearch smtpimap" | sudo tee -a /etc/hosts'
|
|
- run: make deps-backend
|
|
- run: make backend
|
|
env:
|
|
TAGS: bindata
|
|
- name: run migration tests
|
|
run: GITEA_TEST_DATABASE=mysql make test-migration
|
|
- name: run tests
|
|
run: GITEA_TEST_DATABASE=mysql make test-integration
|
|
env:
|
|
TAGS: bindata
|
|
TEST_INDEXER_CODE_ES_URL: "http://elastic:changeme@elasticsearch:9200"
|
|
|
|
test-mssql:
|
|
if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true'
|
|
needs: files-changed
|
|
runs-on: ubuntu-latest
|
|
services:
|
|
mssql:
|
|
image: mcr.microsoft.com/mssql/server:2019-latest
|
|
env:
|
|
ACCEPT_EULA: Y
|
|
MSSQL_PID: Standard
|
|
SA_PASSWORD: MwantsaSecurePassword1
|
|
ports:
|
|
- "1433:1433"
|
|
devstoreaccount1.azurite.local: # https://github.com/Azure/Azurite/issues/1583
|
|
image: mcr.microsoft.com/azure-storage/azurite:latest
|
|
ports:
|
|
- 10000:10000
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
|
|
with:
|
|
go-version-file: go.mod
|
|
check-latest: true
|
|
cache: false
|
|
- uses: ./.github/actions/go-cache
|
|
with:
|
|
cache-name: mssql
|
|
- name: Add hosts to /etc/hosts
|
|
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mssql devstoreaccount1.azurite.local" | sudo tee -a /etc/hosts'
|
|
- run: make deps-backend
|
|
- run: make backend
|
|
env:
|
|
TAGS: bindata
|
|
- run: GITEA_TEST_DATABASE=mssql make test-migration
|
|
- name: run tests
|
|
run: GITEA_TEST_DATABASE=mssql make test-integration
|
|
timeout-minutes: 50
|
|
env:
|
|
TAGS: bindata
|