Updated tests to allow for older Python versions, add Amazon containers

This commit is contained in:
David Murphy 2024-12-11 16:01:54 -07:00
parent f47986ffd5
commit 651d50aa05
No known key found for this signature in database
GPG key ID: 9D7724F37A7424D8
3 changed files with 47 additions and 8 deletions

View file

@ -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'
@ -267,6 +297,8 @@ jobs:
- macos-13
- macos-14
- windows-2022
- amazonlinux-2
- amazonlinux-2023
- debian-12
- photon-5
- rockylinux-8

View file

@ -8,8 +8,6 @@ os.chdir(os.path.abspath(os.path.dirname(__file__)))
# 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",
@ -17,6 +15,8 @@ os.chdir(os.path.abspath(os.path.dirname(__file__)))
# "ubuntu-2004",
# "ubuntu-2404",
LINUX_DISTROS = [
"amazonlinux-2",
"amazonlinux-2023",
"debian-12",
"photon-5",
"rockylinux-8",
@ -36,8 +36,6 @@ OSX = [
# 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",
@ -45,6 +43,8 @@ OSX = [
# "ubuntu-2004",
# "ubuntu-2404",
STABLE_DISTROS = [
"amazonlinux-2",
"amazonlinux-2023",
"debian-12",
"photon-5",
"rockylinux-8",
@ -54,8 +54,6 @@ STABLE_DISTROS = [
# 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",
@ -63,6 +61,8 @@ STABLE_DISTROS = [
# "ubuntu-2004",
# "ubuntu-2404",
ONEDIR_DISTROS = [
"amazonlinux-2",
"amazonlinux-2023",
"debian-12",
"photon-5",
"rockylinux-8",

View file

@ -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)