From 8893a1e6fd562edeee2cea7b3c85fbb14e673966 Mon Sep 17 00:00:00 2001 From: Nicola Sella Date: Thu, 6 Feb 2025 15:34:53 +0100 Subject: [PATCH] Add upstream tests to tmt Signed-off-by: Nicola Sella --- .packit.yaml | 22 ++++++++++++++++++++++ Makefile | 8 ++++++++ plans/main.fmf | 15 ++++++++++----- tests/main.fmf | 14 +++++++++++--- 4 files changed, 51 insertions(+), 8 deletions(-) diff --git a/.packit.yaml b/.packit.yaml index 40b2fe50..ffeab598 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -87,3 +87,25 @@ jobs: targets: - fedora-latest-stable skip_build: true + + - job: tests + trigger: pull_request + tmt_plan: /upstream/all + packages: [python-podman-fedora] + targets: + - fedora-all + + - job: tests + trigger: pull_request + tmt_plan: /upstream/base + packages: [python-podman-centos] + targets: + - centos-stream-9 + - centos-stream-10 + + - job: tests + trigger: pull_request + tmt_plan: /upstream/base + packages: [python-podman-rhel] + targets: + - epel-9 diff --git a/Makefile b/Makefile index e0edf8e7..ce1f961b 100644 --- a/Makefile +++ b/Makefile @@ -26,6 +26,14 @@ tests: tox # see tox.ini for environment variable settings $(PYTHON) -m tox -e coverage,py39,py310,py311,py312,py313 +.PHONY: tests-ci-base-python +tests-ci-base-python: + $(PYTHON) -m tox -e coverage,py + +.PHONY: tests-ci-all-python +tests-ci-all-python: + $(PYTHON) -m tox -e coverage,py39,py310,py311,py312,py313 + .PHONY: unittest unittest: coverage run -m unittest discover -s podman/tests/unit diff --git a/plans/main.fmf b/plans/main.fmf index a5b13888..bab54d85 100644 --- a/plans/main.fmf +++ b/plans/main.fmf @@ -36,20 +36,25 @@ prepare: # we want to change this to tag:stable once all the coverage tests are fixed filter: tag:lint - /tests: - summary: Run Python Podman Tests on upstream PRs + /base: + summary: Run Python Podman Tests on Upstream PRs for base Python discover+: - filter: tag:upstream + filter: tag:base + + /all: + summary: Run Python Podman Tests on Upstream PRs for all Python versions + discover+: + filter: tag:matrix adjust+: enabled: false when: initiator is not defined or initiator != packit /downstream: - /tests: + /all: summary: Run Python Podman Tests on bodhi / errata and dist-git PRs discover+: - filter: tag:downstream + filter: tag:matrix adjust+: enabled: false diff --git a/tests/main.fmf b/tests/main.fmf index 8aa9767e..7800081f 100644 --- a/tests/main.fmf +++ b/tests/main.fmf @@ -18,6 +18,14 @@ require: test: cd .. && make unittest /tests: - tag: [ upstream, downstream ] - summary: Run all tests - test: cd .. && make tests + /base_python: + tag: [ base ] + summary: Run all tests on the base python version + test: cd .. && make tests-ci-base-python + duration: 10m + + /all_python: + tag: [ matrix] + summary: Run all tests for all ptyhon versions available + test: cd .. && make tests-ci-all-python + duration: 10m