From 38578f4597512d4708bfda59fe6aa5aca6ad1a46 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 | 44 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 55 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 151eaf5978..f830228d25 100644 --- a/packit.yaml +++ b/packit.yaml @@ -16,8 +16,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..b39d7ea821 --- /dev/null +++ b/plans/cockpit.fmf @@ -0,0 +1,44 @@ +# 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 + require+: + - cockpit + - cockpit-kdump + - cockpit-networkmanager + - cockpit-sosreport + - cockpit-tests + +/network: + summary: Run tests for cockpit-networkmanager + discover+: + test: /test/browser/network + require+: + - cockpit + - cockpit-networkmanager + +/optional: + summary: Run tests for optional packages + discover+: + test: /test/browser/optional + require+: + - cockpit + - cockpit-storaged + - cockpit-packagekit + - cockpit-tests