From 68474f25da922efb5a96ff8a4ce2e20d20853b50 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 2 Aug 2023 13:46:59 +0200 Subject: [PATCH] ci: Run cockpit tests in PRs See https://cockpit-project.org/blog/tmt-cross-project-testing.html Drop the install-only tests, as TF only runs the default "install check" test if there are no plans, but now we have one. That will cover the installation/upgrade as preparation step. --- .fmf/version | 1 + packit.yaml | 10 ++++++++++ plans/cockpit.fmf | 30 ++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 .fmf/version create mode 100644 plans/cockpit.fmf diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/packit.yaml b/packit.yaml index 005b7679f1..257ac8181b 100644 --- a/packit.yaml +++ b/packit.yaml @@ -15,8 +15,18 @@ jobs: - fedora-development - fedora-latest-stable + # run tests for packages which test SELinux policy well, see plans/ with `revdeps == yes` - job: tests + identifier: revdeps trigger: pull_request targets: - fedora-development - fedora-latest-stable + tf_extra_params: + environments: + - artifacts: + - type: repository-file + id: https://copr.fedorainfracloud.org/coprs/g/cockpit/main-builds/repo/fedora-$releasever/group_cockpit-main-builds-fedora-$releasever.repo + tmt: + context: + revdeps: "yes" diff --git a/plans/cockpit.fmf b/plans/cockpit.fmf new file mode 100644 index 0000000000..c716154b8a --- /dev/null +++ b/plans/cockpit.fmf @@ -0,0 +1,30 @@ +# reverse dependency test for https://github.com/cockpit-project/cockpit +# if this fails in a non-obvious way, please contact the cockpit team in your PR for investigation: +# @martinpitt, @marusak, @jelly + +enabled: false +adjust+: + when: revdeps == yes + enabled: true + +discover: + how: fmf + url: https://github.com/cockpit-project/cockpit + ref: main +execute: + how: tmt + +/basic: + summary: Run tests for basic packages + discover+: + test: /test/browser/basic + +/network: + summary: Run tests for cockpit-networkmanager + discover+: + test: /test/browser/network + +/optional: + summary: Run tests for optional packages + discover+: + test: /test/browser/optional