os-autoinst-distri-opensuse
os-autoinst-distri-opensuse copied to clipboard
Reduce execution of compile tests by checking changed files only
-
Related ticket: https://progress.opensuse.org/issues/124688
-
Verification run: n/a Now only changed files are checked
export PERL5LIB=../..:os-autoinst:lib:tests/installation:tests/x11:tests/qa_automation:tests/virt_autotest:tests/cpu_bugs:tests/sles4sap/saptune:$PERL5LIB: ; for f in
git diff --name-only | grep '.pm'; do perl -c $f 2>&1 | grep -v " OK$" && exit 2; done ; true
I'd argue that the test should check all files to prevent that we're accidentally missing out some files and thus this should not be changed. Isn't also the CI using this test? If so, this change might reduce the overall coverage and introduce the possibility of missing out some files, that should be checked.
IMHO test-compile-changed
is an additional convenience function to be executed locally only.
I'd argue that the test should check all files to prevent that we're accidentally missing out some files and thus this should not be changed. Isn't also the CI using this test? If so, this change might reduce the overall coverage and introduce the possibility of missing out some files, that should be checked.
IMHO
test-compile-changed
is an additional convenience function to be executed locally only.
We can do this for PRs and keep the longer running one for the merges
We can do this for PRs and keep the longer running one for the merges
This introduces the risk that failures in master will not be attended for long but I think that's an acceptable risk
Should also this line be changed? ->
https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/bebe56bb31c8baa9f4ee7e71c9adb105ac7d399b/Makefile#L118 ?
done
Thanks all for the kindly feedback.
I will hold on this PR due to some risks
You can just follow the suggestion in https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/16497#issuecomment-1449668278 to have the "changed" target called in GitHub actions for pull requests, the complete one otherwise. I suggest to look into the GitHub workflow file
You can just follow the suggestion in #16497 (comment) to have the "changed" target called in GitHub actions for pull requests, the complete one otherwise. I suggest to look into the GitHub workflow file
Sure, will do
@foursixnine Seems it is hard to define the different job for ci check for both push and pull_request, so I create a new file
Based on the CI check result, comile tests at pull_request phase is Required
that we can skip it.
ci / CI: Running compile tests with perl v5.26 (pull_request) Successful in 14m Required
We may need change the default required workflow [I don't have the permission to do this] https://docs.github.com/en/actions/using-workflows/required-workflows