Skip to content

Commit

Permalink
onwards
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Oct 21, 2024
1 parent ffe8ae1 commit 46f65a4
Showing 1 changed file with 26 additions and 4 deletions.
30 changes: 26 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,40 @@ jobs:
- uses: actions/checkout@v4
- name: Install Python and Poetry
run: |
if [ -f /etc/debian_version ]; then
apt-get update
apt-get install -y python3 python3-pip pipx
if [ -f /etc/os-release ]; then
. /etc/os-release
if [ "$ID" = "ubuntu" ] && [ "$VERSION_ID" = "20.04" ]; then
# Add deadsnakes PPA for Python 3.12
apt-get update
apt-get install -y software-properties-common
add-apt-repository ppa:deadsnakes/ppa
apt-get update
apt-get install -y python3.12 python3.12-venv python3.12-distutils python3-pip
# Update alternatives to use python3.12
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1
update-alternatives --set python3 /usr/bin/python3.12
python3 -m pip install --upgrade pip
python3 -m pip install pipx
else
apt-get update
apt-get install -y python3 python3-pip pipx
fi
elif [ -f /etc/arch-release ]; then
pacman -Syu --noconfirm python python-pip pipx
elif [ -f /etc/fedora-release ]; then
dnf install -y python3 python3-pip pipx
elif [ -f /etc/gentoo-release ]; then
# Initialize and sync Gentoo repository
emerge-webrsync
emerge --sync
emerge --update --newuse dev-lang/python dev-python/pipx
elif [ -f /etc/alpine-release ]; then
apk add --no-cache python3 py3-pip py3-pipx
apk add --no-cache python3 py3-pip
python3 -m pip install --upgrade pip
python3 -m pip install pipx
fi
# Add $HOME/.local/bin to PATH
export PATH="$HOME/.local/bin:$PATH"
python3 -m pipx ensurepath
pipx install poetry
- name: Install dependencies
Expand Down

0 comments on commit 46f65a4

Please sign in to comment.