Skip to content

Commit

Permalink
add testing farm github action
Browse files Browse the repository at this point in the history
  • Loading branch information
lilyLuLiu committed Jul 26, 2024
1 parent db4810b commit d2338a2
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/testing-farm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Schedule test on Testing Farm
on:
push:
branches:
- "main"
pull_request: {}

# The concurrency key is used to prevent multiple workflows from running at the same time
#concurrency:
# group: my-concurrency-group
# cancel-in-progress: true

permissions:
contents: read
# This is required for the ability to create Issue comment
pull-requests: write
# This is required for the ability to create/update the Pull request status
statuses: write

jobs:
tests:
runs-on: ubuntu-latest
# Let's schedule tests only on user request. NOT automatically.
# Only repository owner or member can schedule tests
#if: |
# github.event.issue.pull_request
# && contains(github.event.comment.body, '[test]')
# && contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association)
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Schedule test on Testing Farm
uses: sclorg/testing-farm-as-github-action@v2
with:
api_key: ${{ secrets.TF_API_KEY }}
tmt_plan_regex: "tf-test"
tmt_path: "test"
9 changes: 9 additions & 0 deletions test/tf-test.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
summary: Basic smoke test

execute:
how: tmt
script: |
set +x
echo "Set 11*11 to testfile"
echo $((11*11)) > testfile
cat testfile

0 comments on commit d2338a2

Please sign in to comment.