Skip to content

Commit

Permalink
Install python based on distro
Browse files Browse the repository at this point in the history
  • Loading branch information
rootmos committed Oct 28, 2023
1 parent c2329f7 commit adc4fb6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,16 @@ jobs:
image: ${{ matrix.distro }}
steps:
- name: Install essentials
run: apk add python3
run: |
if [ "${{ matrix.distro }}" = "alpine:latest" ]; then
apk add python3
elif [ "${{ matrix.distro }}" = "archlinux:latest" ]; then
pacman -Sy
pacman -S --noconfirm python
else
apt-get update
apt-get install --yes --no-install-recommends python3
fi
- name: Check out repository code
uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions openbsd
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ class Situation:
if pacman:
self._distro = "archlinux"
self.logger.debug(f"distribution: {self._distro}")
self._installer = [ pacman, "-S" ]
self._installer = [ pacman, "-S", "--noconfirm" ]
return

apt_get = shutil.which("apt-get")
Expand All @@ -212,7 +212,7 @@ class Situation:
distro = guess["ID"]
if distro == "ubuntu":
self._distro = distro
if distro == "debian":
elif distro == "debian":
self._distro = distro
else:
raise RuntimeError(f"unconfigured debian-like distro: {distro}")
Expand Down

0 comments on commit adc4fb6

Please sign in to comment.