Last active
February 8, 2023 22:10
-
-
Save mhuin/1177dc30971112404fd7c078651682ed to your computer and use it in GitHub Desktop.
Setting up an Ubuntu 22.04 VM to run Zuul unit tests - https://www.softwarefactory-project.io/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# increase file descriptor limit. Might be overkill | |
# to set it to the limit | |
ulimit -n $(ulimit -Hn) | |
cd zuul | |
nox -s tests --install-only | |
echo "Test venv installed. You can update python dependencies with 'source .nox/tests/bin/activate' " | |
echo "then install your desired version." | |
echo | |
echo "Run tests with: 'nox -R -s tests'" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sudo apt update | |
sudo apt -y upgrade | |
sudo apt -y install git git-review vim tmux python3-pip docker docker-compose | |
sudo pip install bindep nox | |
git clone --depth 1 https://opendev.org/zuul/zuul | |
cd zuul | |
sudo apt -y install $(bindep --brief test) | |
# uninstall mysql & postgres as they will run in a compose | |
sudo apt -y remove mysql-server postgresql | |
sudo apt -y install postgresql-client mysql-client | |
sudo apt -y autoremove | |
# Start external services | |
ROOTCMD=sudo tools/test-setup-docker.sh | |
echo "Now would be a great time to snapshot your VM!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment