forgejo/models
Lunny Xiao 97c8dbf332
Fix bug hidden on CI and make ci failed if tests failure (#29254)
The tests on migration tests failed but CI reports successfully

https://github.com/go-gitea/gitea/actions/runs/7364373807/job/20044685969#step:8:141

This PR will fix the bug on migration v283 and also the CI hidden
behaviour.

The reason is on the Makefile

`GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini $(GO) test
$(GOTESTFLAGS) -tags='$(TEST_TAGS)' $(MIGRATE_TEST_PACKAGES)` will
return the error exit code.

But

`for pkg in $(shell $(GO) list
code.gitea.io/gitea/models/migrations/...); do \
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini $(GO) test
$(GOTESTFLAGS) -tags '$(TEST_TAGS)' $$pkg; \
	done`

will not work.

This also fix #29602

(cherry picked from commit 45277486c2c6213b7766b1da708a991cdb1f3565)

Conflicts:
	.github/workflows/pull-db-tests.yml
	Makefile
	models/migrations/v1_22/v283.go
	models/migrations/v1_22/v286_test.go
	models/migrations/v1_22/v287_test.go
	already in Forgejo for the Makefile & CI logic but Gitea changes
	otherwise rule
2024-03-11 23:36:59 +07:00
..
actions remove util.OptionalBool and related functions (#29513) 2024-03-06 12:10:46 +08:00
activities Avoid issue info panic (#29625) 2024-03-11 23:36:58 +07:00
admin
asymkey
auth remove util.OptionalBool and related functions (#29513) 2024-03-06 12:10:46 +08:00
avatars
db
dbfs
fixtures Actions Artifacts v4 backend (#28965) 2024-03-06 12:10:45 +08:00
forgejo/semver
forgejo_migrations
git Start to migrate from util.OptionalBool to optional.Option[bool] (#29329) 2024-02-26 22:30:26 +01:00
issues Merge pull request '[BUG] Disable CODEOWNERS for forked repositories' (#2537) from gusted/forgejo-codeowner-forked into forgejo 2024-03-06 18:18:58 +00:00
migrations Fix bug hidden on CI and make ci failed if tests failure (#29254) 2024-03-11 23:36:59 +07:00
organization
packages Fix incorrect relative/absolute URL usages (#29531) 2024-03-06 12:10:46 +08:00
perm
project remove util.OptionalBool and related functions (#29513) 2024-03-06 12:10:46 +08:00
pull
repo remove util.OptionalBool and related functions (#29513) 2024-03-06 12:10:46 +08:00
secret
shared/types
system
unit
unittest
user Skip email domain check when admins edit user emails (#29609) 2024-03-11 23:36:58 +07:00
webhook remove util.OptionalBool and related functions (#29513) 2024-03-06 12:10:46 +08:00
error.go
fixture_generation.go
fixture_test.go
main_test.go
org.go
org_team.go
org_team_test.go
org_test.go
repo.go
repo_test.go
repo_transfer.go
repo_transfer_test.go