Skip to content

Commit

Permalink
ci: Run cockpit tests in PRs
Browse files Browse the repository at this point in the history
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.

Cherrypicked from rawhide commit ba41134 with adjusting the
target Fedora release to 39.
  • Loading branch information
martinpitt committed Nov 10, 2023
1 parent 96768c5 commit 16447d7
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 4 deletions.
1 change: 1 addition & 0 deletions .fmf/version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
19 changes: 15 additions & 4 deletions packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,22 @@ jobs:
- job: copr_build
trigger: pull_request
targets:
- fedora-development
- fedora-latest-stable
- fedora-39

# 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
- fedora-39
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"
30 changes: 30 additions & 0 deletions plans/cockpit.fmf
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 16447d7

Please sign in to comment.