[ci] Improve checkmigrations in openwisp-utils-qa-checks
For now, checkmigrations in the new openwisp-utils-qa-checks
common CI script is supported only for one migration path and one migration-to-ignore.
In some repo (like django-ipam, django-loci, and more) it's required to check on two migration-path.
And even some repo (like openwisp-users) it's required to check on two migration-path and two different migrations-to-ignore.
To deal with this, we can:
- Still using the custom
runcheckmigration
in those repo and useopenwisp-utils-qa-checks
with --skip-checkmigration. The disadvantage is, well, why should checkmigration exist in the common CI test then... :sweat_smile: - The 'hacky' ways by using two lines of
openwisp-utils-qa-checks
, with the second call to check for other checkmigration and skip all tests. The disadvantage is when there is an addition/removal in the CI test, we should change those repositories too.
Either ways are fine, but kind of defeated the purpose of openwisp-utils-qa-checks
that simplify the workflow of minor change in the CI tests without having to deal with all repositories. So I suggest that we might support multiple checkmigration, separated by semicolon. For example, we can do this for openwisp-users
openwisp-utils-qa-checks --migration-path "./openwisp_users/migrations/ ./tests/testapp/migrations/" --migrations-to-ignore "3 2"
Feel free to discuss/suggest/give your opinion about the better ways to do this :smile:
Read the linked conversation in the GitHub issue for more information.