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

ci: fix tests and use SLE containers #94

Merged
merged 5 commits into from
Jul 17, 2023
Merged

ci: fix tests and use SLE containers #94

merged 5 commits into from
Jul 17, 2023

Conversation

yeoldegrove
Copy link
Collaborator

@yeoldegrove yeoldegrove commented Jul 14, 2023

This fixes the currently broken CI pipeline. Github actions/setup-python deprecated python 2.7 actions/setup-python#543 and is not usable anymore.

  • The new approach uses real SLE 12 SP5 (python 2.7) and 15 SP5 (python 3.6) container images to run the tests.
  • python from official repos is used
  • python packages are installed from pip (as most of them are not available in repos)
  • codeclimate is removed (as discussed with @arbulu89)

The SLE 15 SP5 tests will fail, as #93 still has to be fixed.

@yeoldegrove yeoldegrove added the ci label Jul 14, 2023
@yeoldegrove yeoldegrove self-assigned this Jul 14, 2023
Copy link
Collaborator

@arbulu89 arbulu89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have to confess that I'm not a big fan of using git cloned versions, as it will become outdated at some point.
But hey, i don't have much suggestion except using zypper/leap, so up to you @yeoldegrove hehe

.github/workflows/salt-shaptools-ci.yml Show resolved Hide resolved
.github/workflows/salt-shaptools-ci.yml Show resolved Hide resolved
# minimal python packages and compilers
zypper -n in -y python3-pip python3-devel gcc
# use current salt version shipped with SLE 15
git clone --branch=openSUSE/release/3006.0 --depth=50 https://github.com/openSUSE/salt ../salt
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't remember this hacky thing we had before 😅
If we want to install salt using the same version shipped in SLE, why don't we use zypper?
This way, we would always have the latest rolling version I guess

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arbulu89 Again, for Leap 42.3 there will be no updated anymore. Also for SLE 12.5 one needs to register an additional Module to install salt.
python-shaptools is also not available for Leap ...

I really would vote to use SLE. One could even think about building images before running the CI steps...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I forgot is that there also is some magic in tests/run.sh that uses stuff from the salt repo that is not delivered as rpm.

cp salt/modules/*.py ../salt/salt/modules/
cp salt/states/*.py ../salt/salt/states/
cp tests/unit/modules/*.py ../salt/tests/unit/modules/
cp tests/unit/states/*.py ../salt/tests/unit/states/
py.test -vv ../salt/tests/unit/modules/test_hanamod.py ../salt/tests/unit/states/test_hanamod.py  ../salt/tests/unit/modules/test_crmshmod.py  ../salt/tests/unit/modules/test_saptunemod.py ../salt/tests/unit/modules/test_sapcarmod.py ../salt/tests/unit/states/test_crmshmod.py ../salt/tests/unit/modules/test_drbdmod.py ../salt/tests/unit/states/test_drbdmod.py ../salt/tests/unit/states/test_saptunemod.py ../salt/tests/unit/modules/test_netweavermod.py ../salt/tests/unit/states/test_netweavermod.py ../salt/tests/unit/states/test_sapcarmod.py --cov=salt.modules.hanamod --cov=salt.states.hanamod --cov=salt.modules.crmshmod --cov=salt.states.crmshmod --cov=salt.modules.drbdmod --cov=salt.modules.saptunemod --cov=salt.modules.sapcarmod --cov=salt.states.saptunemod --cov=salt.states.drbdmod --cov=salt.modules.netweavermod --cov=salt.states.netweavermod --cov=salt.states.sapcarmod --cov-config .coveragerc --cov-report term --cov-report xml --cov-report html

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pushed another commit that at least installs the packaged salt version. Had to do a little other change to tets/run.sh.

Copy link
Collaborator

@arbulu89 arbulu89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have my blessing @yeoldegrove XD
This salt versioning thing was already a pain in the *** hehe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants