Skip to content

Commit a010261

Browse files
Test and verify with tmt and TF (#301)
Test and verify with tmt and TF Reviewed-by: Maja Massarini
2 parents 7da44b7 + e376915 commit a010261

File tree

13 files changed

+163
-16
lines changed

13 files changed

+163
-16
lines changed

.fmf/version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1

.packit.yaml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,20 @@ srpm_build_deps:
3636
- python3-hatch-vcs
3737

3838
jobs:
39-
- job: propose_downstream
40-
trigger: release
41-
dist_git_branches:
42-
- fedora-all
39+
# PR jobs
4340
- job: copr_build
4441
trigger: pull_request
4542
targets:
4643
- fedora-all
4744
- epel-9
45+
46+
- job: tests
47+
trigger: pull_request
48+
targets:
49+
- fedora-all
50+
- epel-9
51+
52+
# Latest-greatest development build
4853
- job: copr_build
4954
trigger: commit
5055
branch: main
@@ -54,6 +59,13 @@ jobs:
5459
- epel-9
5560
list_on_homepage: True
5661
preserve_project: True
62+
63+
# Jobs on release
64+
- job: propose_downstream
65+
trigger: release
66+
dist_git_branches:
67+
- fedora-all
68+
5769
- job: copr_build
5870
trigger: release
5971
project: packit-releases
@@ -63,13 +75,14 @@ jobs:
6375
list_on_homepage: True
6476
preserve_project: True
6577

66-
# downstream automation:
78+
# Downstream automation
6779
- job: koji_build
6880
trigger: commit
6981
packit_instances: ["stg"]
7082
dist_git_branches:
7183
- fedora-all
7284
- epel-9
85+
7386
- job: bodhi_update
7487
trigger: commit
7588
packit_instances: ["stg"]

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,10 @@ repos:
6262
- LICENSE_HEADER.txt
6363
- --comment-style
6464
- "#"
65+
- repo: https://github.com/teemtee/tmt.git
66+
rev: 1.41.0
67+
hooks:
68+
- id: tmt-lint
69+
# Do not run in pre-commit.ci as it requires an internet access
70+
# for verifying imported tmt plans
71+
stages: [manual, pre-push]

ci.fmf

Lines changed: 0 additions & 11 deletions
This file was deleted.

plans/full.fmf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
summary:
2+
Unit & integration tests
3+
4+
discover+:
5+
filter: tier:1
6+
7+
prepare:
8+
# Enable packit-dev Copr repo to get the latest builds of packages
9+
- how: install
10+
copr: packit/packit-dev
11+
12+
# Make sure the Copr repo has higher priority than TF Tag Repository
13+
- how: shell
14+
script: sed -i -n '/^priority=/!p;$apriority=5' /etc/yum.repos.d/*:packit:packit-dev.repo

plans/main.fmf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
discover:
2+
how: fmf
3+
4+
execute:
5+
how: tmt

plans/ogr-integration.fmf

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
discover:
2+
how: fmf
3+
url: https://github.com/packit/ogr
4+
filter: tier:0 | tier:1
5+
6+
prepare:
7+
- how: install
8+
copr: packit/packit-dev
9+
10+
# make sure the Copr repo has higher priority than TF Tag Repository
11+
- how: shell
12+
script: sed -i -n '/^priority=/!p;$apriority=5' /etc/yum.repos.d/*:packit:packit-dev.repo
13+
14+
adjust:
15+
- when: "how == integration"
16+
because: "provide latest python-requre rpm when running locally"
17+
prepare+:
18+
- name: python3-requre rpm
19+
how: install
20+
directory: noarch/
21+
22+
- when: "distro == rhel-8 or distro == centos-8 or distro == centos-stream-8"
23+
because: "ogr doesn't support EL 8"
24+
enabled: false

plans/packit-integration.fmf

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
discover:
2+
how: fmf
3+
url: https://github.com/packit/packit
4+
filter: tier:0 | tier:1
5+
6+
prepare:
7+
- how: install
8+
copr: packit/packit-dev
9+
10+
# make sure the Copr repo has higher priority than TF Tag Repository
11+
- how: shell
12+
script: sed -i -n '/^priority=/!p;$apriority=5' /etc/yum.repos.d/*:packit:packit-dev.repo
13+
14+
adjust:
15+
- when: "how == integration"
16+
because: "provide latest python-requre rpm when running locally"
17+
prepare+:
18+
- name: python3-requre rpm
19+
how: install
20+
directory: noarch/
21+
22+
- when: "distro == rhel-9 or distro == centos-9 or distro == centos-stream-9"
23+
because: "build and deepdiff are not in EPEL 9"
24+
prepare+:
25+
- how: install
26+
package: python3-pip
27+
- how: shell
28+
script: pip3 install build 'deepdiff < 8.0.0' # version 8.0.0 depends on numpy, avoid it
29+
30+
- when: "distro == rhel-8 or distro == centos-8 or distro == centos-stream-8"
31+
because: "packit doesn't support EL 8"
32+
enabled: false

plans/rpmlint.fmf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
summary:
2+
Run linters on source code and packaging files
3+
4+
prepare:
5+
- name: packages
6+
how: install
7+
package:
8+
- rpmlint
9+
10+
discover:
11+
how: shell
12+
tests:
13+
- name: rpmlint
14+
test: rpmlint fedora/python-requre.spec

plans/smoke.fmf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
summary:
2+
Basic smoke test
3+
4+
discover+:
5+
filter: tier:0

0 commit comments

Comments
 (0)