Files
gitea/.github/workflows/pull-db-tests.yml
Giteabot c81eca9904 chore(deps): update action dependencies (#37603)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/labeler](https://redirect.github.com/actions/labeler) |
action | minor | `v6.0.1` → `v6.1.0` |
|
[aws-actions/configure-aws-credentials](https://redirect.github.com/aws-actions/configure-aws-credentials)
| action | patch | `v6.1.0` → `v6.1.1` |
|
[docker.elastic.co/elasticsearch/elasticsearch](https://www.elastic.co/products/elasticsearch)
([source](https://redirect.github.com/elastic/elasticsearch)) | service
| patch | `8.19.14` → `8.19.15` |
|
[renovatebot/github-action](https://redirect.github.com/renovatebot/github-action)
| action | patch | `v46.1.12` → `v46.1.13` |

---

### Release Notes

<details>
<summary>actions/labeler (actions/labeler)</summary>

###
[`v6.1.0`](https://redirect.github.com/actions/labeler/releases/tag/v6.1.0)

[Compare
Source](https://redirect.github.com/actions/labeler/compare/v6.0.1...v6.1.0)

#### Enhancements

- Add changed-files-labels-limit and max-files-changed configuration
options to cap the number of labels added by
[@&#8203;bluca](https://redirect.github.com/bluca) in
[#&#8203;923](https://redirect.github.com/actions/labeler/pull/923)

#### Bug Fixes

- Improve Labeler Action documentation and permission error handling by
[@&#8203;chiranjib-swain](https://redirect.github.com/chiranjib-swain)
in [#&#8203;897](https://redirect.github.com/actions/labeler/pull/897)
- Preserve manually added labels during workflow runs and refine label
synchronization logic by
[@&#8203;chiranjib-swain](https://redirect.github.com/chiranjib-swain)
in [#&#8203;917](https://redirect.github.com/actions/labeler/pull/917)

#### Dependency Updates

- Upgrade brace-expansion from 1.1.11 to 1.1.12 and document breaking
changes in v6 by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[#&#8203;877](https://redirect.github.com/actions/labeler/pull/877)
- Upgrade minimatch from 10.0.1 to 10.2.3 by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[#&#8203;926](https://redirect.github.com/actions/labeler/pull/926)
- Upgrade dependencies
([@&#8203;actions/core](https://redirect.github.com/actions/core),
[@&#8203;actions/github](https://redirect.github.com/actions/github),
js-yaml, minimatch,
[@&#8203;typescript-eslint](https://redirect.github.com/typescript-eslint))
by [@&#8203;Copilot](https://redirect.github.com/Copilot) in
[#&#8203;934](https://redirect.github.com/actions/labeler/pull/934)

#### New Contributors

- [@&#8203;chiranjib-swain](https://redirect.github.com/chiranjib-swain)
made their first contribution in
[#&#8203;897](https://redirect.github.com/actions/labeler/pull/897)
- [@&#8203;bluca](https://redirect.github.com/bluca) made their first
contribution in
[#&#8203;923](https://redirect.github.com/actions/labeler/pull/923)
- [@&#8203;Copilot](https://redirect.github.com/Copilot) made their
first contribution in
[#&#8203;934](https://redirect.github.com/actions/labeler/pull/934)

**Full Changelog**:
<https://github.com/actions/labeler/compare/v6...v6.1.0>

</details>

<details>
<summary>aws-actions/configure-aws-credentials
(aws-actions/configure-aws-credentials)</summary>

###
[`v6.1.1`](https://redirect.github.com/aws-actions/configure-aws-credentials/releases/tag/v6.1.1)

[Compare
Source](https://redirect.github.com/aws-actions/configure-aws-credentials/compare/v6.1.0...v6.1.1)

##### What's Changed

- chore(deps-dev): bump esbuild from 0.27.4 to 0.28.0 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;1722](https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1722)
- chore(deps-dev): bump
[@&#8203;types/node](https://redirect.github.com/types/node) from 25.5.0
to 25.5.2 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;1723](https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1723)
- chore(deps-dev): bump
[@&#8203;smithy/property-provider](https://redirect.github.com/smithy/property-provider)
from 4.2.12 to 4.2.13 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;1724](https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1724)
- chore(deps): bump proxy-agent from 8.0.0 to 8.0.1 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;1726](https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1726)
- chore(deps): bump
[@&#8203;smithy/node-http-handler](https://redirect.github.com/smithy/node-http-handler)
from 4.5.1 to 4.5.2 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;1725](https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1725)
- chore(deps): bump
[@&#8203;aws-sdk/client-sts](https://redirect.github.com/aws-sdk/client-sts)
from 3.1020.0 to 3.1025.0 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;1727](https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1727)
- chore(deps): bump basic-ftp from 5.2.0 to 5.2.1 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;1728](https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1728)
- chore(deps): bump basic-ftp from 5.2.1 to 5.2.2 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;1729](https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1729)
- chore(deps-dev): bump
[@&#8203;types/node](https://redirect.github.com/types/node) from 25.5.2
to 25.6.0 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;1730](https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1730)
- chore(deps-dev): bump
[@&#8203;aws-sdk/credential-provider-env](https://redirect.github.com/aws-sdk/credential-provider-env)
from 3.972.24 to 3.972.25 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;1733](https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1733)
- chore(deps): bump
[@&#8203;aws-sdk/client-sts](https://redirect.github.com/aws-sdk/client-sts)
from 3.1025.0 to 3.1030.0 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;1732](https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1732)
- chore(deps-dev): bump
[@&#8203;biomejs/biome](https://redirect.github.com/biomejs/biome) from
2.4.10 to 2.4.11 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;1734](https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1734)
- chore(deps): bump basic-ftp from 5.2.2 to 5.3.0 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;1736](https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1736)
- chore(deps-dev): bump memfs from 4.57.1 to 4.57.2 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;1737](https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1737)
- chore(deps-dev): bump typescript from 6.0.2 to 6.0.3 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;1740](https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1740)
- chore(deps-dev): bump
[@&#8203;smithy/property-provider](https://redirect.github.com/smithy/property-provider)
from 4.2.13 to 4.2.14 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;1741](https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1741)
- chore(deps-dev): bump
[@&#8203;aws-sdk/credential-provider-env](https://redirect.github.com/aws-sdk/credential-provider-env)
from 3.972.25 to 3.972.28 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;1742](https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1742)
- chore(deps): bump
[@&#8203;aws-sdk/client-sts](https://redirect.github.com/aws-sdk/client-sts)
from 3.1030.0 to 3.1033.0 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;1743](https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1743)
- chore(deps-dev): bump
[@&#8203;biomejs/biome](https://redirect.github.com/biomejs/biome) from
2.4.11 to 2.4.12 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;1739](https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1739)
- chore(deps-dev): bump
[@&#8203;biomejs/biome](https://redirect.github.com/biomejs/biome) from
2.4.12 to 2.4.13 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;1747](https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1747)
- chore(deps): bump postcss from 8.5.6 to 8.5.12 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;1752](https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1752)
- chore(deps): bump
[@&#8203;smithy/node-http-handler](https://redirect.github.com/smithy/node-http-handler)
from 4.6.0 to 4.6.1 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;1750](https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1750)
- chore(deps-dev): bump
[@&#8203;aws-sdk/credential-provider-env](https://redirect.github.com/aws-sdk/credential-provider-env)
from 3.972.28 to 3.972.32 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;1751](https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1751)
- chore(deps): bump
[@&#8203;aws-sdk/client-sts](https://redirect.github.com/aws-sdk/client-sts)
from 3.1033.0 to 3.1038.0 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;1749](https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1749)
- chore: release 6.1.1 by
[@&#8203;lehmanmj](https://redirect.github.com/lehmanmj) in
[#&#8203;1757](https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1757)

**Full Changelog**:
<https://github.com/aws-actions/configure-aws-credentials/compare/v6...v6.1.1>

</details>

<details>
<summary>elastic/elasticsearch
(docker.elastic.co/elasticsearch/elasticsearch)</summary>

###
[`v8.19.15`](https://redirect.github.com/elastic/elasticsearch/releases/tag/v8.19.15):
Elasticsearch 8.19.15

[Compare
Source](https://redirect.github.com/elastic/elasticsearch/compare/v8.19.14...v8.19.15)

Downloads: <https://elastic.co/downloads/elasticsearch>
Release notes:
<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/release-notes-8.19.15.html>

</details>

<details>
<summary>renovatebot/github-action (renovatebot/github-action)</summary>

###
[`v46.1.13`](https://redirect.github.com/renovatebot/github-action/releases/tag/v46.1.13)

[Compare
Source](https://redirect.github.com/renovatebot/github-action/compare/v46.1.12...v46.1.13)

##### Documentation

- update references to renovatebot/github-action to v46.1.12
([a871d4d](a871d4d546))

##### Miscellaneous Chores

- **deps:** update dependency
[@&#8203;commitlint/cli](https://redirect.github.com/commitlint/cli) to
v20.5.2
([67a74d1](67a74d123d))
- **deps:** update pnpm to v10.33.1
([5932d6c](5932d6c4e6))
- **deps:** update pnpm to v10.33.2
([580c97f](580c97f45b))

##### Build System

- **deps:** lock file maintenance
([d044e7d](d044e7df57))

##### Continuous Integration

- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.159.1
([a7db9c3](a7db9c38fd))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.159.2
([f9133ef](f9133ef80d))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.160.0
([212d525](212d52574e))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.160.1
([e3443ce](e3443ceef9))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.160.2
([833041b](833041bb68))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.160.4
([60cc865](60cc8654e1))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.160.5
([2c7567a](2c7567a8f8))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.160.6
([35caad2](35caad2c6a))

</details>

---

This PR has been generated by [Mend
Renovate](https://redirect.github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xNDEuNSIsInVwZGF0ZWRJblZlciI6IjQzLjE0MS41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->

Co-authored-by: Nicolas <bircni@icloud.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2026-05-08 18:30:53 +00:00

263 lines
8.7 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:
# pgsql is chosen to be the unlucky one to run with the slow "race detector", it is about 60% slower.
GOTEST_FLAGS: -race -timeout=40m
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
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:
# sqlite driver can contain large amount of Golang code, so don't use race detector for it, otherwise, extremely slow
GOTEST_FLAGS: -timeout=40m
TAGS: bindata gogit
GOEXPERIMENT:
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.15
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:
GOTEST_FLAGS: -race -timeout=20m
TAGS: bindata
GITHUB_READ_TOKEN: ${{ secrets.GITHUB_READ_TOKEN }}
- name: unit-tests-gogit
run: make test-backend test-check
env:
GOTEST_FLAGS: -race -timeout=20m
TAGS: bindata gogit
GOEXPERIMENT:
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.15
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