Skip to content

Commit a54b19f

Browse files
phracekclaude
andcommitted
Add Testing Farm integration with TMT metadata and GitHub Actions
- Initialize FMF tree and create TMT test plans for daily-tests, eol-checker, and ocp-stream-generator - Add test definitions that run tox with Python version matrix - Add GitHub Actions workflow triggered by [test] PR comment using sclorg/testing-farm-as-github-action@v4 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
1 parent 2006d88 commit a54b19f

11 files changed

Lines changed: 92 additions & 0 deletions

File tree

‎.fmf/version‎

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

‎.github/workflows/testing-farm.yml‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Testing Farm
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
8+
permissions:
9+
contents: read
10+
pull-requests: write
11+
statuses: write
12+
13+
concurrency:
14+
group: "testing-farm-${{ github.event.issue.number }}"
15+
cancel-in-progress: true
16+
17+
jobs:
18+
tests:
19+
runs-on: ubuntu-latest
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
tox_env: [py311, py312, py313, py314]
24+
steps:
25+
- uses: sclorg/testing-farm-as-github-action@v4
26+
with:
27+
api_key: ${{ secrets.TF_PUBLIC_API_KEY }}
28+
compose: Fedora-45
29+
tmt_plan_regex: ".*"
30+
variables: "TOX_ENV=${{ matrix.tox_env }}"
31+
update_pull_request_status: "true"
32+
pull_request_status_name: "Testing Farm - ${{ matrix.tox_env }}"
33+
create_issue_comment: "true"

‎plans/daily-tests.fmf‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
summary: Run daily-tests pytest suite
2+
discover:
3+
how: fmf
4+
filter: tag:daily-tests
5+
execute:
6+
how: tmt

‎plans/eol-checker.fmf‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
summary: Run eol-checker pytest suite
2+
discover:
3+
how: fmf
4+
filter: tag:eol-checker
5+
execute:
6+
how: tmt

‎plans/ocp-stream-generator.fmf‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
summary: Run ocp-stream-generator pytest suite
2+
discover:
3+
how: fmf
4+
filter: tag:ocp-stream-generator
5+
execute:
6+
how: tmt

‎tests/daily-tests/main.fmf‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
summary: daily-tests unit tests
2+
test: ./test.sh
3+
tag:
4+
- daily-tests
5+
duration: 10m
6+
require:
7+
- python3-pytest
8+
- python3-flexmock
9+
- python3-pyyaml
10+
- python3-requests
11+
- python3-xmltodict
12+
- python3-pyyaml
13+
- python-tox

‎tests/daily-tests/test.sh‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
tox -e "${TOX_ENV:-py314}"

‎tests/eol-checker/main.fmf‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
summary: eol-checker unit tests
2+
test: ./test.sh
3+
tag:
4+
- eol-checker
5+
duration: 10m
6+
require:
7+
- python3-pytest
8+
- python3-pyyaml
9+
- python-tox

‎tests/eol-checker/test.sh‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
tox -e "${TOX_ENV:-py314}"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
summary: ocp-stream-generator unit tests
2+
test: ./test.sh
3+
tag:
4+
- ocp-stream-generator
5+
duration: 10m
6+
require:
7+
- python3-pytest
8+
- python3-pyyaml
9+
- python-tox

0 commit comments

Comments
 (0)