Skip to content

Commit

Permalink
Add boilerplate NEX-MAXIMUS unit test generation workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
gblewis1 committed Jan 19, 2024
1 parent fc66f4f commit 3dd5d55
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/ON-BOARDING-NEW-BRANCH.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: ON-BOARDING-NEW-BRANCH
on:
workflow_dispatch
jobs:
Checkout:
runs-on: [self-hosted, maximus-unit-test]
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0

CREATE-PR:
needs: Checkout
runs-on: [self-hosted, maximus-unit-test]
name: Create GenAI Branch and PR
steps:
- id: maximus-create-pr-action
uses: intel-innersource/frameworks.actions.maximus.genai-gpt/create-pr@feature/genai_ut_eval_release
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
48 changes: 48 additions & 0 deletions .github/workflows/UNIT-TEST-GEN-ALL.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: UNIT-TEST-GEN-ALL
on:
workflow_dispatch:
# pull_request:
jobs:
Checkout:
if: startsWith(github.ref, 'refs/heads/NEX_MAXIMUS_UT/')
runs-on: [self-hosted, maximus-unit-test]
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0

CREATE-USER-RUN-ENV:
needs: Checkout
runs-on: [self-hosted, maximus-unit-test]
name: Create User Run Environment
steps:
- id: maximus-create-env-action
uses: intel-innersource/frameworks.actions.maximus.genai-gpt/create-env@feature/genai_ut_eval_release
env:
# <Input relative filepath of your requirements.txt path i.e. dir-name/requirements.txt >
REQUIREMENTS_PATH: requirements.txt

GENAI-UNIT-TEST-GENERATE:
needs: CREATE-USER-RUN-ENV
runs-on: [self-hosted, maximus-unit-test]
name: Generate Unit Tests using GenAI
steps:
- id: maximus-ut-gen-action
uses: intel-innersource/frameworks.actions.maximus.genai-gpt/unit-test@feature/genai_ut_eval_release
env:
TASK_TYPE: generate
# INCLUDE_PATHS: <Include your paths here if want to generate UT on specific files/dirs>
# EXCLUDE_PATHS: <Exclude your paths here if want to exclude specific files/dirs>

UNIT-TEST-RUN:
needs: GENAI-UNIT-TEST-GENERATE
runs-on: [self-hosted, maximus-unit-test]
name: Run Unit Tests
steps:
- id: maximus-ut-run-action
uses: intel-innersource/frameworks.actions.maximus.genai-gpt/unit-test@feature/genai_ut_eval_release
env:
TASK_TYPE: run
# INCLUDE_PATHS: <Include your paths here if want to run UT on specific files/dirs>
# EXCLUDE_PATHS: <Exclude your paths here if want to exclude specific files/dirs>
35 changes: 35 additions & 0 deletions .github/workflows/UNIT-TEST-RUN-WORKFLOW-DISPATCH.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: UNIT-TEST-RUN-WORKFLOW-DISPATCH
on:
workflow_dispatch
jobs:
Checkout:
if: startsWith(github.ref, 'refs/heads/NEX_MAXIMUS_UT/')
runs-on: [self-hosted, maximus-unit-test]
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0

CREATE-USER-RUN-ENV:
needs: Checkout
runs-on: [self-hosted, maximus-unit-test]
name: Create User Run Environment
steps:
- id: maximus-create-env-action
uses: intel-innersource/frameworks.actions.maximus.genai-gpt/create-env@feature/genai_ut_eval_release
env:
# <Input relative filepath of your requirements.txt path i.e. dir-name/requirements.txt >
REQUIREMENTS_PATH: requirements.txt

UNIT-TEST-RUN:
needs: CREATE-USER-RUN-ENV
runs-on: [self-hosted, maximus-unit-test]
name: Run Unit Tests
steps:
- id: genai-maximus-action
uses: intel-innersource/frameworks.actions.maximus.genai-gpt/unit-test@feature/genai_ut_eval_release
env:
TASK_TYPE: run
# INCLUDE_PATHS: <Include your paths here if want to run UT on specific files/dirs>
# EXCLUDE_PATHS: <Exclude your paths here if want to exclude specific files/dirs>

0 comments on commit 3dd5d55

Please sign in to comment.