mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-07-25 02:48:05 +00:00
`registry.redict.io/redict:7.3.0-scratch` image is no longer available resulting in [build errors](https://codeberg.org/forgejo/forgejo/actions/runs/170823/jobs/7/attempt/1). This PR removes redict from the testing matrix, and replaces it with redis for the coverage testing. redict does not appear to be an active project, with no updates in 8 months: https://codeberg.org/redict/redict Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/13116 Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.codeberg.org>
89 lines
3.4 KiB
YAML
89 lines
3.4 KiB
YAML
name: coverage
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
repository:
|
|
description: 'repository'
|
|
type: string
|
|
ref:
|
|
description: 'ref'
|
|
type: string
|
|
unit-tests-env:
|
|
description: 'COVERAGE_TEST_PACKAGES=forgejo.org/modules/actions'
|
|
type: string
|
|
integration-tests-env:
|
|
description: 'COVERAGE_TEST_ARGS=-run=TestAPIListRepoComments'
|
|
type: string
|
|
|
|
jobs:
|
|
all:
|
|
runs-on: docker
|
|
container:
|
|
image: 'data.forgejo.org/oci/ci:2'
|
|
# options: --tmpfs /tmp:exec,noatime # Too much memory usage
|
|
services:
|
|
elasticsearch:
|
|
image: data.forgejo.org/oci/bitnami/elasticsearch:7
|
|
options: --tmpfs /bitnami/elasticsearch/data
|
|
env:
|
|
discovery.type: single-node
|
|
ES_JAVA_OPTS: '-Xms512m -Xmx512m'
|
|
minio:
|
|
image: data.forgejo.org/oci/bitnami/minio:2024.8.17
|
|
options: >-
|
|
--hostname gitea.minio --tmpfs /bitnami/minio/data:noatime
|
|
env:
|
|
MINIO_DOMAIN: minio
|
|
MINIO_ROOT_USER: 123456
|
|
MINIO_ROOT_PASSWORD: 12345678
|
|
mysql:
|
|
image: 'data.forgejo.org/oci/bitnami/mysql:8.4'
|
|
env:
|
|
ALLOW_EMPTY_PASSWORD: yes
|
|
MYSQL_DATABASE: testgitea
|
|
#
|
|
# See also https://codeberg.org/forgejo/forgejo/issues/976
|
|
#
|
|
MYSQL_EXTRA_FLAGS: --innodb-adaptive-flushing=OFF --innodb-buffer-pool-size=4G --innodb-log-buffer-size=128M --innodb-flush-log-at-trx-commit=0 --innodb-flush-log-at-timeout=30 --innodb-flush-method=nosync --innodb-fsync-threshold=1000000000 --disable-log-bin
|
|
options: --tmpfs /bitnami/mysql/data:noatime
|
|
ldap:
|
|
image: data.forgejo.org/oci/forgejo-test-openldap:latest
|
|
pgsql:
|
|
image: data.forgejo.org/oci/bitnami/postgresql:16
|
|
env:
|
|
POSTGRESQL_DATABASE: test
|
|
POSTGRESQL_PASSWORD: postgres
|
|
POSTGRESQL_FSYNC: off
|
|
POSTGRESQL_EXTRA_FLAGS: -c full_page_writes=off
|
|
options: --tmpfs /bitnami/postgresql
|
|
cacher:
|
|
image: data.forgejo.org/oci/bitnami/redis:7.2
|
|
options: --tmpfs /data:noatime,uid=1000,gid=1000
|
|
steps:
|
|
- uses: https://data.forgejo.org/actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
with:
|
|
repository: ${{ inputs.repository }}
|
|
ref: ${{ inputs.ref }}
|
|
- uses: ./.forgejo/workflows-composite/setup-env
|
|
- name: install git >= 2.42
|
|
uses: ./.forgejo/workflows-composite/apt-install-from
|
|
with:
|
|
packages: git
|
|
- uses: ./.forgejo/workflows-composite/build-backend
|
|
- run: |
|
|
su forgejo -c '${{ inputs.unit-tests-env }} make coverage-run'
|
|
su forgejo -c '${{ inputs.integration-tests-env }} make coverage-run-pgsql'
|
|
su forgejo -c '${{ inputs.integration-tests-env }} make coverage-run-mysql'
|
|
su forgejo -c '${{ inputs.integration-tests-env }} make coverage-run-sqlite'
|
|
su forgejo -c 'make coverage-merge'
|
|
timeout-minutes: 180
|
|
env:
|
|
TEST_ELASTICSEARCH_URL: http://elasticsearch:9200
|
|
TEST_MINIO_ENDPOINT: minio:9000
|
|
TEST_LDAP: 1
|
|
TEST_REDIS_SERVER: cacher:6379
|
|
- uses: https://data.forgejo.org/forgejo/upload-artifact@cb8afe72b42edc798abfb8fcb556cf660d894245 # v5
|
|
with:
|
|
name: coverage
|
|
path: ${{ forge.workspace }}/coverage/merged
|