From 69e59d4d733015bcd8d3d6ecd235cf4803722100 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 | 13 +++++++++++++ plans/cockpit.fmf | 30 ++++++++++++++++++++++++++++++ 3 files changed, 44 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 bcea2c9c29..e81ae254d1 100644 --- a/packit.yaml +++ b/packit.yaml @@ -16,8 +16,21 @@ 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 + notifications: + failure_comment: + message: "Cockpit tests failed for commit {commit_sha}. @martinpitt, @jelly, @mvollmer please check." 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..d08f48f546 --- /dev/null +++ b/plans/cockpit.fmf @@ -0,0 +1,30 @@ +# reverse dependency test for https://github.com/cockpit-project/cockpit +# packit should automatically notify the cockpit maintainers on failures. +# For questions, please contact @martinpitt, @jelly, @mvollmer + +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