From a78461eb66113c0d9d5b4c3fed6fcaf0da0e266f Mon Sep 17 00:00:00 2001 From: lilyLuLiu Date: Fri, 26 Jul 2024 11:34:51 +0800 Subject: [PATCH] add testing farm github action --- .github/workflows/testing-farm.yml | 28 ++++++++++++++++++++++++++++ .github/workflows/tf-test.fmf | 16 ++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 .github/workflows/testing-farm.yml create mode 100644 .github/workflows/tf-test.fmf diff --git a/.github/workflows/testing-farm.yml b/.github/workflows/testing-farm.yml new file mode 100644 index 0000000000..c810526b3b --- /dev/null +++ b/.github/workflows/testing-farm.yml @@ -0,0 +1,28 @@ +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 + +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: Schedule test on Testing Farm + uses: sclorg/testing-farm-as-github-action@v2 + with: + api_key: ${{ secrets.TF_API_KEY }} + #tmt_plan_regex: "centos" + tmt_path: "." diff --git a/.github/workflows/tf-test.fmf b/.github/workflows/tf-test.fmf new file mode 100644 index 0000000000..a0ea4896f6 --- /dev/null +++ b/.github/workflows/tf-test.fmf @@ -0,0 +1,16 @@ +summary: Basic smoke test + +description: | + The plan for testing skipping of empty plans. + +provision: + how: container + image: fedora:latest + +execute: + how: tmt + script: | + set +x + echo "Set 11*11 to testfile" + echo $((11*11)) > testfile + cat testfile \ No newline at end of file