Skip to content

Commit

Permalink
Add upstream tests to tmt
Browse files Browse the repository at this point in the history
Signed-off-by: Nicola Sella <nsella@redhat.com>
  • Loading branch information
inknos committed Feb 6, 2025
1 parent 945693b commit 8893a1e
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 8 deletions.
22 changes: 22 additions & 0 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 10 additions & 5 deletions plans/main.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 11 additions & 3 deletions tests/main.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 8893a1e

Please sign in to comment.