Skip to content

Commit

Permalink
on-boarding testing farm
Browse files Browse the repository at this point in the history
  • Loading branch information
lmilbaum committed Dec 27, 2023
1 parent 0d23b33 commit 198805f
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
1 change: 1 addition & 0 deletions .fmf/version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
43 changes: 43 additions & 0 deletions .github/workflows/testing-farm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Testing farm tests

on:
pull_request_target:
types: [opened, synchronize, reopened]

jobs:
testing-farm:
name: "Run in testing farm"
runs-on: ubuntu-latest
steps:
- name: Get User Permission
id: checkAccess
uses: actions-cool/[email protected]
with:
require: write
username: ${{ github.triggering_actor }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Check User Permission
if: steps.checkAccess.outputs.require-result == 'false'
run: |
echo "${{ github.triggering_actor }} does not have permissions on this repo."
echo "Current permission level is ${{ steps.checkAccess.outputs.user-permission }}"
echo "Job originally triggered by ${{ github.actor }}"
exit 1
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Schedule test on Testing Farm
uses: sclorg/[email protected]
with:
compose: Fedora-39
api_key: ${{ secrets.TESTING_FARM_API_TOKEN }}
git_url: ${{ github.event.pull_request.head.repo.clone_url }}
git_ref: ${{ github.event.pull_request.head.ref }}
tmt_plan_regex: "example"
pull_request_status_name: "Testing farm"
tf_scope: private
7 changes: 7 additions & 0 deletions plans/example.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
summary: Example test
execute:
how: tmt
script: |
set +x
dnf install -y tmt
tmt --help

0 comments on commit 198805f

Please sign in to comment.