I have a project requirement to run certain test cases only on master builds. This is done by a unittest decorator like this @unitttest.skipUnless(os.environ['CIRCLE_BRANCH'] == "master", "Run test cases only on master builds")
I also want this to run these test cases if a developer chooses to run it on any non-master branch.
I’m wondering if there is a way to override the unittest decorator with a git command(git commit/push) so that the test cases gets picked up and executed in Circle CI. Perhaps an environment variable which could read the PR label from github or the commit message ? Something like “[ci skip]” - But instead of skipping, which can be read as an environment variable within the CI environment ?