Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge GH Actions workflows that run tests into a single workflow #1611

Conversation

JeanChristopheMorinPerso
Copy link
Member

@JeanChristopheMorinPerso JeanChristopheMorinPerso commented Jan 7, 2024

Merge GH Actions workflows that run tests into a single workflow.

Changes:

  • CI workflows are now merged into a single workflow. I also got rid of the core tests. Now all tests are always run. Anyway, running all tests is only slightly longer than running just the "core" tests.
  • Windows tests are no more using docker images. It was really slow to download the images on every run. Which means that they now take about as much time to run than Linux and macOS :)
  • The per_available_shell decorator now sets config.default_shell to enforce the default shell when used. This avoids mistakes where we forget to call config.override("default_shell", shell) in tests decorated with per_available_shell. About a dozen or more tests were simply not testing any other shell then the current default shell (including all the shell tests!).
  • Every test that was using the "hello_world" bind module were depending on .PY to be in PATHEXT on Windows. This is very error prone. This is now fixed by wrapping the python code into an executable using distlib (like pip does with entry points).
  • rez-selftest will now create a "python" rez package that is used by our test packages (for building, etc) to fix issues when there is no executable python on a system. This also removes the implicit dependency in our test packages. Note that the python package simply contains a virtualenv. That's very simple and does the trick. We don't really care about which version of python we need anyway. We just need a python interpreter.
  • Now testing Python 3.7, 3.8, 3.9, 3.10 and 3.11. Previously, only Python 3.7 was tested.
  • Testing more python versions showed a bug in the latest tests I added for the deprecation warnings in the configs. This bug was only present on Windows and was a bug in the test itself. It's now fixed.

All these changes are required due to dropping the docker images on Windows and also due to the fact that we are now using macos-latest, which doesn't have a python executable (it only has python3).

.github/workflows/tests.yaml Outdated Show resolved Hide resolved
.github/workflows/tests.yaml Outdated Show resolved Hide resolved
.github/workflows/tests.yaml Outdated Show resolved Hide resolved
…ests to make sure the tests are using the right shell

Signed-off-by: Jean-Christophe Morin <[email protected]>
package instead of a python script.

Signed-off-by: Jean-Christophe Morin <[email protected]>
…ends on make and GCC

Signed-off-by: Jean-Christophe Morin <[email protected]>
…our test packages.

This will hopefully fix issues when there is no system python available.

Signed-off-by: Jean-Christophe Morin <[email protected]>
Signed-off-by: Jean-Christophe Morin <[email protected]>
Signed-off-by: Jean-Christophe Morin <[email protected]>
@JeanChristopheMorinPerso JeanChristopheMorinPerso marked this pull request as ready for review January 27, 2024 15:33
@JeanChristopheMorinPerso JeanChristopheMorinPerso requested a review from a team as a code owner January 27, 2024 15:33
…ith 3.8 in test workflow

Signed-off-by: Jean-Christophe Morin <[email protected]>
@JeanChristopheMorinPerso JeanChristopheMorinPerso merged commit 222ee07 into AcademySoftwareFoundation:main Jan 27, 2024
54 of 55 checks passed
@JeanChristopheMorinPerso JeanChristopheMorinPerso deleted the simplify_ci branch January 27, 2024 15:49
Pixel-Minions pushed a commit to Pixel-Minions/rez that referenced this pull request Feb 14, 2024
…demySoftwareFoundation#1611)

* Merge GH Actions workflows that run tests into a single workflow
* Configure default_shell when using per_available_shell decorator in tests to make sure the tests are using the right shell
* Add test for per_available_shell decorator does what it's supposed to
* Fix shell tests on Windows by creating an executable for the hello_world package instead of a python script.
* Skip test_build::TestBuild::test_build_custom on Windows since it depends on make and GCC
* Create a python rez package on the fly and use it as a dependency on our test packages. This will hopefully fix issues when there is no system python available.
* Fix linter warnings
* Remove old workflows
* Fix test_deprecation_from_user_config on Windows
* Add python 3.8, 3.9, 3.0 and 3.11 to installation workflow and test with 3.8 in test workflow

---------

Signed-off-by: Jean-Christophe Morin <[email protected]>
Signed-off-by: Jose Enriquez <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant