From 9dfd54b0737dc3002bab09919342218c81d424bc Mon Sep 17 00:00:00 2001 From: Maja Massarini Date: Tue, 12 Mar 2024 15:24:17 +0100 Subject: [PATCH] Create a setup with many tests/builds matches --- .packit.yaml | 72 +++++++++++++++++++++++++++++++++++++--------------- hello.spec | 3 +++ 2 files changed, 55 insertions(+), 20 deletions(-) diff --git a/.packit.yaml b/.packit.yaml index dce8acc3..64d05d35 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -1,41 +1,73 @@ --- -packit_instances: ["prod", "stg"] +packit_instances: ["stg"] specfile_path: hello.spec files_to_sync: - .packit.yaml - hello.spec upstream_package_name: hello downstream_package_name: hello -# actions: -# post-upstream-clone: "python3 setup.py sdist --dist-dir ." -# current_version_command: ["python3", "setup.py", "--version"] -# create_tarball_command: ["python3", "setup.py", "sdist", "--dist-dir", "."] + +test_command: + default_identifier: inspect + + jobs: - job: copr_build trigger: pull_request + identifier: latest targets: - - fedora-stable-x86_64 - - fedora-rawhide-x86_64 + - fedora-latest-x86_64 - job: copr_build - trigger: release + trigger: pull_request + identifier: rawhide targets: - - fedora-stable + - fedora-rawhide-x86_64 -- job: copr_build - trigger: commit - branch: main +- job: tests + manual_trigger: false + labels: + - inspect + identifier: inspect-latest + trigger: pull_request + fmf_url: https://github.com/packit/tmt-plans + fmf_ref: main + tmt_plan: "/plans/rpminspect" targets: - - fedora-stable + - fedora-latest-x86_64 - job: tests + manual_trigger: false + labels: + - inspect + identifier: inspect-rawhide trigger: pull_request + fmf_url: https://github.com/packit/tmt-plans + fmf_ref: main + tmt_plan: "/plans/rpminspect" targets: - - fedora-stable-x86_64 - - fedora-rawhide-x86_64 + - fedora-rawhide-x86_64 + +- job: tests + manual_trigger: false + labels: + - lint + identifier: lint-latest + trigger: pull_request + fmf_url: https://github.com/packit/tmt-plans + fmf_ref: main + tmt_plan: "/plans/rpmlint" + targets: + - fedora-latest-x86_64 -- job: propose_downstream - trigger: release - packit_instances: ["stg"] - dist_git_branches: - - fedora-all +- job: tests + manual_trigger: false + labels: + - lint + identifier: lint-rawhide + trigger: pull_request + fmf_url: https://github.com/packit/tmt-plans + fmf_ref: main + tmt_plan: "/plans/rpmlint" + targets: + - fedora-rawhide-x86_64 \ No newline at end of file diff --git a/hello.spec b/hello.spec index afd23b0d..0c777e06 100644 --- a/hello.spec +++ b/hello.spec @@ -17,6 +17,9 @@ BuildRequires: python3-setuptools %autosetup -n %{name}-%{version} %build +%if 0%{?fedora} <= 41 +exit 1 +%endif %py3_build %install