-
Notifications
You must be signed in to change notification settings - Fork 21
67 lines (64 loc) · 2.06 KB
/
UNIT-TEST-GEN-ALL.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: UNIT-TEST-GEN-ALL
on:
workflow_dispatch:
# pull_request:
permissions: read-all
jobs:
Checkout:
if: startsWith(github.ref, 'refs/heads/NEX_MAXIMUS_UT/')
runs-on: [self-hosted, maximus-unit-test-os]
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-os]
name: Create User Run Environment
steps:
- id: maximus-create-env-action
run: |
cd ../../../genai_ut_gen
bash ./create_user_env.sh
env:
# <Input relative filepath of your requirements.txt path i.e. dir-name/requirements.txt >
REQUIREMENTS_PATH: requirements.txt
GENAI-UNIT-TEST-GENERATE:
permissions:
contents: write
pull-requests: write
needs: CREATE-USER-RUN-ENV
runs-on: [self-hosted, maximus-unit-test-os]
name: Generate Unit Tests using GenAI
steps:
- id: maximus-ut-gen-action
run: |
cd ../../../genai_ut_gen
cp /home/runner/scripts/.env .
chmod +x ./get_unittest_details.sh
./get_unittest_details.sh
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
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:
permissions:
contents: write
pull-requests: write
needs: GENAI-UNIT-TEST-GENERATE
runs-on: [self-hosted, maximus-unit-test-os]
name: Run Unit Tests
steps:
- id: maximus-ut-run-action
run: |
cd ../../../genai_ut_gen
cp /home/runner/scripts/.env .
chmod +x ./get_unittest_details.sh
./get_unittest_details.sh
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
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>