1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-24 08:57:03 -05:00
forgejo/models/migrations/fixtures/Test_RepositoryFormat
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
..
comment.yml Fix bug hidden on CI and make ci failed if tests failure (#29254) 2024-03-11 23:36:59 +07:00
commit_status.yml Fix bug hidden on CI and make ci failed if tests failure (#29254) 2024-03-11 23:36:59 +07:00
pull_request.yml Fix bug hidden on CI and make ci failed if tests failure (#29254) 2024-03-11 23:36:59 +07:00
release.yml Fix bug hidden on CI and make ci failed if tests failure (#29254) 2024-03-11 23:36:59 +07:00
repo_archiver.yml Fix bug hidden on CI and make ci failed if tests failure (#29254) 2024-03-11 23:36:59 +07:00
repo_indexer_status.yml Fix bug hidden on CI and make ci failed if tests failure (#29254) 2024-03-11 23:36:59 +07:00
repository.yml Add support for sha256 repositories (#23894) 2024-01-19 17:05:02 +01:00
review_state.yml Fix bug hidden on CI and make ci failed if tests failure (#29254) 2024-03-11 23:36:59 +07:00