Files
devstar/.gitea/workflows/devstar-studio-db-tests.yaml
2025-12-30 20:34:52 +08:00

54 lines
1.6 KiB
YAML

name: DevStar-Studio db-tests
on:
pull_request:
concurrency:
jobs:
files-changed:
uses: ./.gitea/workflows/devstar-studio-files-changed.yaml
test-unit:
if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true'
needs: files-changed
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true
- run: GOPROXY=https://goproxy.cn,direct make deps-backend
- run: make backend
env:
TAGS: bindata
- name: unit-tests
run: GITEA_I_AM_BEING_UNSAFE_RUNNING_AS_ROOT=true CI="" make test-backend
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@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true
- run: GOPROXY=https://goproxy.cn,direct make deps-backend
- run: make backend
env:
TAGS: bindata gogit sqlite sqlite_unlock_notify
- name: run migration tests
run: GITEA_I_AM_BEING_UNSAFE_RUNNING_AS_ROOT=true make test-sqlite-migration
- name: run tests
run: GITEA_I_AM_BEING_UNSAFE_RUNNING_AS_ROOT=true make test-sqlite
timeout-minutes: 50
env:
TAGS: bindata gogit sqlite sqlite_unlock_notify
TEST_TAGS: gogit sqlite sqlite_unlock_notify
USE_REPO_TEST_DIR: 1