Skip to content

Commit

Permalink
Updated tests to allow for older Python versions, add Amazon containers
Browse files Browse the repository at this point in the history
  • Loading branch information
dmurphy18 committed Dec 11, 2024
1 parent f47986f commit 651d50a
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 8 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,36 @@ jobs:



amazonlinux-2:
name: Amazon 2
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
uses: ./.github/workflows/test-linux.yml
needs:
- lint
- generate-actions-workflow
with:
distro-slug: amazonlinux-2
display-name: Amazon 2
container-slug: amazonlinux-2
timeout: 20
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]'


amazonlinux-2023:
name: Amazon 2023
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
uses: ./.github/workflows/test-linux.yml
needs:
- lint
- generate-actions-workflow
with:
distro-slug: amazonlinux-2023
display-name: Amazon 2023
container-slug: amazonlinux-2023
timeout: 20
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]'


debian-12:
name: Debian 12
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
Expand Down Expand Up @@ -267,6 +297,8 @@ jobs:
- macos-13
- macos-14
- windows-2022
- amazonlinux-2
- amazonlinux-2023
- debian-12
- photon-5
- rockylinux-8
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/templates/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@

# only test against current containers with systemd
# will add these when they become available with systemd
# "amazonlinux-2",
# "amazonlinux-2023",
# "debian-11",
# "debian-13",
# "fedora-40",
# "photon-4",
# "ubuntu-2004",
# "ubuntu-2404",
LINUX_DISTROS = [
"amazonlinux-2",
"amazonlinux-2023",
"debian-12",
"photon-5",
"rockylinux-8",
Expand All @@ -36,15 +36,15 @@

# only test against current containers with systemd
# will add these when they become available with systemd
# "amazonlinux-2",
# "amazonlinux-2023",
# "debian-11",
# "debian-13",
# "fedora-40",
# "photon-4",
# "ubuntu-2004",
# "ubuntu-2404",
STABLE_DISTROS = [
"amazonlinux-2",
"amazonlinux-2023",
"debian-12",
"photon-5",
"rockylinux-8",
Expand All @@ -54,15 +54,15 @@

# only test against current containers with systemd
# will add these when they become available with systemd
# "amazonlinux-2",
# "amazonlinux-2023",
# "debian-11",
# "debian-13",
# "fedora-40",
# "photon-4",
# "ubuntu-2004",
# "ubuntu-2404",
ONEDIR_DISTROS = [
"amazonlinux-2",
"amazonlinux-2023",
"debian-12",
"photon-5",
"rockylinux-8",
Expand Down
11 changes: 9 additions & 2 deletions tests/integration/test_installation.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,18 @@ def run_salt_call(cmd):
log.error(f"failed to produce output result, '{result}'")

else:
## DGM cmdl = ["sudo"]
cmdl = []
print(f"DGM run_salt_call platform.system '{platform.system()}'", flush=True)
if platform.system() == "Darwin":
cmdl = ["sudo"]
else:
cmdl = []
cmdl.extend(cmd)
cmdl.append("--out=json")
result = subprocess.run(cmdl, capture_output=True, text=True)
try:
result = subprocess.run(cmd, capture_output=True, text=True)
except TypeError:
result = subprocess.run(cmd, text=True)
print(f"DGM run_salt_call result '{result}'", flush=True)
if 0 == result.returncode:
json_data = json.loads(result.stdout)
Expand Down

0 comments on commit 651d50a

Please sign in to comment.