From 58a587c2305ff0b2d3fdb425f07f544bb53bf025 Mon Sep 17 00:00:00 2001 From: Connor Hack Date: Wed, 2 Oct 2024 10:32:37 -0700 Subject: [PATCH 01/11] Add new input field --- .../gha_workflow_llama_models_tests.yml | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/gha_workflow_llama_models_tests.yml b/.github/workflows/gha_workflow_llama_models_tests.yml index ae9e9acb..81920609 100644 --- a/.github/workflows/gha_workflow_llama_models_tests.yml +++ b/.github/workflows/gha_workflow_llama_models_tests.yml @@ -6,7 +6,7 @@ on: branches: - 'main' #paths: - #- 'models/**/*.py' + - 'models/**/*.py' workflow_dispatch: inputs: @@ -25,10 +25,10 @@ on: required: true default: "0" - api_tests: - description: 'Include tests with API keys' - required: true - default: false + api_key: + description: 'Provider API key' + required: false + default: "" model: description: 'Llama model to use for testing' @@ -43,6 +43,7 @@ on: env: TOKENIZER_PATH: "models/llama3/api/tokenizer.model" MODELS_PATH: '/data/llama3/models' + API_KEY: ${{ github.event.inputs.api_key }} jobs: execute_workflow: @@ -134,9 +135,9 @@ jobs: pip install xmlrunner pip install pytest - ###################### - #### TEST RUNNING #### - ###################### + ############################################ + #### AUTOMATIC TESTING ON PULL REQUESTS #### + ############################################ #- name: Run Tokenizer tests # id: run_tests_tokenizer @@ -152,9 +153,10 @@ jobs: # echo "[STEP] Running tool utils test on Self-Hosted k8s ARC Runner" # cd $GITHUB_WORKSPACE && python3 -m unittest models/llama3/tests/api/test_tool_utils.py --junitxml="$GITHUB_WORKSPACE/result.xml" - - name: "Running PyTest tests on Self-Hosted k8s ARC Runner" + - name: "Running all PyTest tests on Self-Hosted k8s ARC Runner" id: pytest working-directory: ${{ github.workspace }} + if: github.event_name == 'workflow_dispatch' run: | echo "Running PyTest tests at 'GITHUB_WORKSPACE' path: ${GITHUB_WORKSPACE} | path: ${{ github.workspace }}" python3 -m pytest --junitxml="${{ github.workspace }}/result.xml" From d3ddea7b5f38acdb23e67763207ecef078d349c8 Mon Sep 17 00:00:00 2001 From: Connor Hack Date: Wed, 2 Oct 2024 13:05:53 -0700 Subject: [PATCH 02/11] Organize workflow code --- .../gha_workflow_llama_models_tests.yml | 82 ++++++++++++------- 1 file changed, 51 insertions(+), 31 deletions(-) diff --git a/.github/workflows/gha_workflow_llama_models_tests.yml b/.github/workflows/gha_workflow_llama_models_tests.yml index 81920609..04b1d11b 100644 --- a/.github/workflows/gha_workflow_llama_models_tests.yml +++ b/.github/workflows/gha_workflow_llama_models_tests.yml @@ -5,7 +5,8 @@ on: types: opened branches: - 'main' - #paths: + paths: + # Trigger workflow only if changes include files within the models directory - 'models/**/*.py' workflow_dispatch: @@ -75,7 +76,6 @@ jobs: fi echo "Content of '${{ inputs.model }}' model" ls -la ${{ env.MODELS_PATH }}/${{ inputs.model }} - exit 0 - name: "[DEBUG] Get runner container OS information" @@ -139,53 +139,73 @@ jobs: #### AUTOMATIC TESTING ON PULL REQUESTS #### ############################################ - #- name: Run Tokenizer tests - # id: run_tests_tokenizer - # if: always() - # run: | - # echo "[STEP]Running Tokenizer tests on Self-Hosted k8s ARC Runner" - # cd $GITHUB_WORKSPACE && python3 -m unittest models/llama3/api/test_tokenizer.py - - #- name: Run tool utils tests - # id: run_tests_tool_utils - # if: always() - # run: | - # echo "[STEP] Running tool utils test on Self-Hosted k8s ARC Runner" - # cd $GITHUB_WORKSPACE && python3 -m unittest models/llama3/tests/api/test_tool_utils.py --junitxml="$GITHUB_WORKSPACE/result.xml" - - - name: "Running all PyTest tests on Self-Hosted k8s ARC Runner" - id: pytest + #### Run tests #### + + - name: Run Tokenizer tests + id: run_tests_tokenizer working-directory: ${{ github.workspace }} - if: github.event_name == 'workflow_dispatch' + if: github.event_name == 'pull_request_target' run: | - echo "Running PyTest tests at 'GITHUB_WORKSPACE' path: ${GITHUB_WORKSPACE} | path: ${{ github.workspace }}" - python3 -m pytest --junitxml="${{ github.workspace }}/result.xml" + echo "[STEP]Running Tokenizer tests on Self-Hosted k8s ARC Runner" + python3 -m pytest models/llama3/api/test_tokenizer.py - #################################### - #### TEST REPORTS AND SUMMARIES #### - #################################### - - name: Test Summary - id: create_test_summary + - name: Run tool utils tests + id: run_tests_tool_utils + if: always() + run: | + echo "[STEP] Running tool utils test on Self-Hosted k8s ARC Runner" + cd $GITHUB_WORKSPACE && python3 -m unittest models/llama3/tests/api/test_tool_utils.py --junitxml="$GITHUB_WORKSPACE/result.xml" + + #### Create test summary #### + + - name: PR - Test Summary + id: create_test_summary_pr + if: github.event_name == 'pull_request_target' uses: test-summary/action@v2 with: paths: "${{ github.workspace }}/result.xml" output: test-summary.md if: always() - - name: Upload test summary - id: publish_test_summary + - name: PR - Upload Test Summary + id: publish_test_summary_pr + if: github.event_name == 'pull_request_target' uses: actions/upload-artifact@v4 with: name: test-summary path: test-summary.md if: always() - ############################## - #### PULL REQUEST COMMENT #### - ############################## + #### Update PR request #### + - name: Update Pull Request with a comment id: publish_pr_comment if: github.event_name == 'pull_request_target' uses: thollander/actions-comment-pull-request@v2 with: filePath: test-summary.md + + + ######################## + #### MANUAL TESTING #### + ######################## + + #### Run tests #### + + - name: "Running all PyTest tests on Self-Hosted k8s ARC Runner" + id: pytest + working-directory: ${{ github.workspace }} + if: github.event_name == 'workflow_dispatch' + run: | + echo "[STEP] Running PyTest tests at 'GITHUB_WORKSPACE' path: ${GITHUB_WORKSPACE} | path: ${{ github.workspace }}" + python3 -m pytest --junitxml="${{ github.workspace }}/result.xml" + + #### Create test summary #### + + - name: Manual - Test Summary + id: create_test_summary_manual + if: github.event_name == 'workflow_dispatch' + uses: test-summary/action@v2 + with: + paths: "${{ github.workspace }}/result.xml" + if: always() From 0e7f6bdcdc3452d078cfedddf1e05e8f433642a9 Mon Sep 17 00:00:00 2001 From: Connor Hack Date: Wed, 2 Oct 2024 14:43:06 -0700 Subject: [PATCH 03/11] Remove unnecessary if always statements --- .github/workflows/gha_workflow_llama_models_tests.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/gha_workflow_llama_models_tests.yml b/.github/workflows/gha_workflow_llama_models_tests.yml index 04b1d11b..e5f9f1fb 100644 --- a/.github/workflows/gha_workflow_llama_models_tests.yml +++ b/.github/workflows/gha_workflow_llama_models_tests.yml @@ -151,7 +151,7 @@ jobs: - name: Run tool utils tests id: run_tests_tool_utils - if: always() + if: github.event_name == 'pull_request_target' run: | echo "[STEP] Running tool utils test on Self-Hosted k8s ARC Runner" cd $GITHUB_WORKSPACE && python3 -m unittest models/llama3/tests/api/test_tool_utils.py --junitxml="$GITHUB_WORKSPACE/result.xml" @@ -165,7 +165,6 @@ jobs: with: paths: "${{ github.workspace }}/result.xml" output: test-summary.md - if: always() - name: PR - Upload Test Summary id: publish_test_summary_pr @@ -174,7 +173,6 @@ jobs: with: name: test-summary path: test-summary.md - if: always() #### Update PR request #### @@ -208,4 +206,3 @@ jobs: uses: test-summary/action@v2 with: paths: "${{ github.workspace }}/result.xml" - if: always() From 5cb48d9d74b18b293b31ea3dfdecf9430e2aac89 Mon Sep 17 00:00:00 2001 From: Connor Hack Date: Wed, 2 Oct 2024 15:21:25 -0700 Subject: [PATCH 04/11] Temporarily remove API_key env var --- .github/workflows/gha_workflow_llama_models_tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gha_workflow_llama_models_tests.yml b/.github/workflows/gha_workflow_llama_models_tests.yml index e5f9f1fb..9c0f9ba3 100644 --- a/.github/workflows/gha_workflow_llama_models_tests.yml +++ b/.github/workflows/gha_workflow_llama_models_tests.yml @@ -44,7 +44,7 @@ on: env: TOKENIZER_PATH: "models/llama3/api/tokenizer.model" MODELS_PATH: '/data/llama3/models' - API_KEY: ${{ github.event.inputs.api_key }} + #API_KEY: ${{ github.event.inputs.api_key }} jobs: execute_workflow: @@ -76,6 +76,7 @@ jobs: fi echo "Content of '${{ inputs.model }}' model" ls -la ${{ env.MODELS_PATH }}/${{ inputs.model }} + exit 0 - name: "[DEBUG] Get runner container OS information" From 78b59485da4e33d7ecd868b62e8fcd886d210a24 Mon Sep 17 00:00:00 2001 From: Connor Hack Date: Wed, 2 Oct 2024 15:35:54 -0700 Subject: [PATCH 05/11] Revert version of upload artifact --- .github/workflows/gha_workflow_llama_models_tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/gha_workflow_llama_models_tests.yml b/.github/workflows/gha_workflow_llama_models_tests.yml index 9c0f9ba3..4f6026e6 100644 --- a/.github/workflows/gha_workflow_llama_models_tests.yml +++ b/.github/workflows/gha_workflow_llama_models_tests.yml @@ -44,7 +44,7 @@ on: env: TOKENIZER_PATH: "models/llama3/api/tokenizer.model" MODELS_PATH: '/data/llama3/models' - #API_KEY: ${{ github.event.inputs.api_key }} + API_KEY: ${{ github.event.inputs.api_key }} jobs: execute_workflow: @@ -148,14 +148,14 @@ jobs: if: github.event_name == 'pull_request_target' run: | echo "[STEP]Running Tokenizer tests on Self-Hosted k8s ARC Runner" - python3 -m pytest models/llama3/api/test_tokenizer.py + #python3 -m pytest models/llama3/api/test_tokenizer.py - name: Run tool utils tests id: run_tests_tool_utils if: github.event_name == 'pull_request_target' run: | echo "[STEP] Running tool utils test on Self-Hosted k8s ARC Runner" - cd $GITHUB_WORKSPACE && python3 -m unittest models/llama3/tests/api/test_tool_utils.py --junitxml="$GITHUB_WORKSPACE/result.xml" + #cd $GITHUB_WORKSPACE && python3 -m unittest models/llama3/tests/api/test_tool_utils.py --junitxml="$GITHUB_WORKSPACE/result.xml" #### Create test summary #### @@ -170,7 +170,7 @@ jobs: - name: PR - Upload Test Summary id: publish_test_summary_pr if: github.event_name == 'pull_request_target' - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: test-summary path: test-summary.md From 2cba9acdf2704d4593ece7bac8db072dd13cf1eb Mon Sep 17 00:00:00 2001 From: Connor Hack Date: Wed, 2 Oct 2024 15:50:26 -0700 Subject: [PATCH 06/11] Update formatting --- .github/workflows/gha_workflow_llama_models_tests.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/gha_workflow_llama_models_tests.yml b/.github/workflows/gha_workflow_llama_models_tests.yml index 4f6026e6..baf4d963 100644 --- a/.github/workflows/gha_workflow_llama_models_tests.yml +++ b/.github/workflows/gha_workflow_llama_models_tests.yml @@ -6,7 +6,6 @@ on: branches: - 'main' paths: - # Trigger workflow only if changes include files within the models directory - 'models/**/*.py' workflow_dispatch: @@ -29,7 +28,7 @@ on: api_key: description: 'Provider API key' required: false - default: "" + default: "-" model: description: 'Llama model to use for testing' @@ -52,7 +51,7 @@ jobs: defaults: run: shell: bash # default shell to run all steps for a given job. - runs-on: ${{ github.event.inputs.runner != '' && github.event.inputs.runner || 'llama-models-fork-gha-runnes-gpu' }} + runs-on: ${{ github.event.inputs.runner != '' && github.event.inputs.runner || 'llama-models-gha-runnes-gpu' }} steps: ############################## @@ -123,7 +122,6 @@ jobs: sudo apt update -y sudo apt upgrade -y sudo apt install python3-pip -y - sudo apt install git-lfs -y - name: "Installing 'llama-models' dependencies" id: pip_install From 097a51dd495b723c8a0f97fbb0d7a2ddcc7bfe82 Mon Sep 17 00:00:00 2001 From: Connor Hack Date: Thu, 3 Oct 2024 06:57:40 -0700 Subject: [PATCH 07/11] Temporarily comment out test steps --- .../gha_workflow_llama_models_tests.yml | 96 +++++++++---------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/.github/workflows/gha_workflow_llama_models_tests.yml b/.github/workflows/gha_workflow_llama_models_tests.yml index baf4d963..3acea3a4 100644 --- a/.github/workflows/gha_workflow_llama_models_tests.yml +++ b/.github/workflows/gha_workflow_llama_models_tests.yml @@ -140,47 +140,47 @@ jobs: #### Run tests #### - - name: Run Tokenizer tests - id: run_tests_tokenizer - working-directory: ${{ github.workspace }} - if: github.event_name == 'pull_request_target' - run: | - echo "[STEP]Running Tokenizer tests on Self-Hosted k8s ARC Runner" - #python3 -m pytest models/llama3/api/test_tokenizer.py - - - name: Run tool utils tests - id: run_tests_tool_utils - if: github.event_name == 'pull_request_target' - run: | - echo "[STEP] Running tool utils test on Self-Hosted k8s ARC Runner" - #cd $GITHUB_WORKSPACE && python3 -m unittest models/llama3/tests/api/test_tool_utils.py --junitxml="$GITHUB_WORKSPACE/result.xml" + #- name: Run Tokenizer tests + # id: run_tests_tokenizer + # working-directory: ${{ github.workspace }} + # if: github.event_name == 'pull_request_target' + # run: | + # echo "[STEP]Running Tokenizer tests on Self-Hosted k8s ARC Runner" + # python3 -m pytest models/llama3/api/test_tokenizer.py + + #- name: Run tool utils tests + # id: run_tests_tool_utils + # if: github.event_name == 'pull_request_target' + # run: | + # echo "[STEP] Running tool utils test on Self-Hosted k8s ARC Runner" + # cd $GITHUB_WORKSPACE && python3 -m unittest models/llama3/tests/api/test_tool_utils.py --junitxml="$GITHUB_WORKSPACE/result.xml" #### Create test summary #### - - name: PR - Test Summary - id: create_test_summary_pr - if: github.event_name == 'pull_request_target' - uses: test-summary/action@v2 - with: - paths: "${{ github.workspace }}/result.xml" - output: test-summary.md - - - name: PR - Upload Test Summary - id: publish_test_summary_pr - if: github.event_name == 'pull_request_target' - uses: actions/upload-artifact@v3 - with: - name: test-summary - path: test-summary.md + #- name: PR - Test Summary + # id: create_test_summary_pr + # if: github.event_name == 'pull_request_target' + # uses: test-summary/action@v2 + # with: + # paths: "${{ github.workspace }}/result.xml" + # output: test-summary.md + + #- name: PR - Upload Test Summary + # id: publish_test_summary_pr + # if: github.event_name == 'pull_request_target' + # uses: actions/upload-artifact@v3 + # with: + # name: test-summary + # path: test-summary.md #### Update PR request #### - - name: Update Pull Request with a comment - id: publish_pr_comment - if: github.event_name == 'pull_request_target' - uses: thollander/actions-comment-pull-request@v2 - with: - filePath: test-summary.md + #- name: Update Pull Request with a comment + # id: publish_pr_comment + # if: github.event_name == 'pull_request_target' + # uses: thollander/actions-comment-pull-request@v2 + # with: + # filePath: test-summary.md ######################## @@ -189,19 +189,19 @@ jobs: #### Run tests #### - - name: "Running all PyTest tests on Self-Hosted k8s ARC Runner" - id: pytest - working-directory: ${{ github.workspace }} - if: github.event_name == 'workflow_dispatch' - run: | - echo "[STEP] Running PyTest tests at 'GITHUB_WORKSPACE' path: ${GITHUB_WORKSPACE} | path: ${{ github.workspace }}" - python3 -m pytest --junitxml="${{ github.workspace }}/result.xml" + #- name: "Running all PyTest tests on Self-Hosted k8s ARC Runner" + # id: pytest + # working-directory: ${{ github.workspace }} + # if: github.event_name == 'workflow_dispatch' + # run: | + # echo "[STEP] Running PyTest tests at 'GITHUB_WORKSPACE' path: ${GITHUB_WORKSPACE} | path: ${{ github.workspace }}" + # python3 -m pytest --junitxml="${{ github.workspace }}/result.xml" #### Create test summary #### - - name: Manual - Test Summary - id: create_test_summary_manual - if: github.event_name == 'workflow_dispatch' - uses: test-summary/action@v2 - with: - paths: "${{ github.workspace }}/result.xml" + #- name: Manual - Test Summary + # id: create_test_summary_manual + # if: github.event_name == 'workflow_dispatch' + # uses: test-summary/action@v2 + # with: + # paths: "${{ github.workspace }}/result.xml" From 5ddfaaf04847d13fe09e312d801db1fca988dc4f Mon Sep 17 00:00:00 2001 From: Connor Hack Date: Thu, 3 Oct 2024 07:07:21 -0700 Subject: [PATCH 08/11] Temporarily remove api_key input --- .../workflows/gha_workflow_llama_models_tests.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/gha_workflow_llama_models_tests.yml b/.github/workflows/gha_workflow_llama_models_tests.yml index 3acea3a4..6d4972dd 100644 --- a/.github/workflows/gha_workflow_llama_models_tests.yml +++ b/.github/workflows/gha_workflow_llama_models_tests.yml @@ -25,10 +25,10 @@ on: required: true default: "0" - api_key: - description: 'Provider API key' - required: false - default: "-" + #api_key: + # description: 'Provider API key' + # required: false + # default: "-" model: description: 'Llama model to use for testing' @@ -43,7 +43,7 @@ on: env: TOKENIZER_PATH: "models/llama3/api/tokenizer.model" MODELS_PATH: '/data/llama3/models' - API_KEY: ${{ github.event.inputs.api_key }} + #API_KEY: ${{ github.event.inputs.api_key }} jobs: execute_workflow: @@ -51,7 +51,7 @@ jobs: defaults: run: shell: bash # default shell to run all steps for a given job. - runs-on: ${{ github.event.inputs.runner != '' && github.event.inputs.runner || 'llama-models-gha-runnes-gpu' }} + runs-on: ${{ github.event.inputs.runner != '' && github.event.inputs.runner || 'llama-models-fork-gha-runnes-gpu' }} steps: ############################## From 0dbe61584e81ed6ad79745bb710a756aed9e29c2 Mon Sep 17 00:00:00 2001 From: Connor Hack Date: Thu, 3 Oct 2024 07:48:49 -0700 Subject: [PATCH 09/11] Temporarily comment out lines --- .github/workflows/gha_workflow_llama_models_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gha_workflow_llama_models_tests.yml b/.github/workflows/gha_workflow_llama_models_tests.yml index 6d4972dd..165c89bc 100644 --- a/.github/workflows/gha_workflow_llama_models_tests.yml +++ b/.github/workflows/gha_workflow_llama_models_tests.yml @@ -6,7 +6,7 @@ on: branches: - 'main' paths: - - 'models/**/*.py' + #- 'models/**/*.py' workflow_dispatch: inputs: From 04901709aca8e21716bba338ad6d5dbacb6750fb Mon Sep 17 00:00:00 2001 From: Connor Hack Date: Thu, 3 Oct 2024 11:57:18 -0700 Subject: [PATCH 10/11] Uncomment temporary blocks --- .../gha_workflow_llama_models_tests.yml | 108 +++++++++--------- 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/.github/workflows/gha_workflow_llama_models_tests.yml b/.github/workflows/gha_workflow_llama_models_tests.yml index 165c89bc..5dc0a921 100644 --- a/.github/workflows/gha_workflow_llama_models_tests.yml +++ b/.github/workflows/gha_workflow_llama_models_tests.yml @@ -6,7 +6,7 @@ on: branches: - 'main' paths: - #- 'models/**/*.py' + - 'models/**/*.py' workflow_dispatch: inputs: @@ -25,10 +25,10 @@ on: required: true default: "0" - #api_key: - # description: 'Provider API key' - # required: false - # default: "-" + api_key: + description: 'Provider API key' + required: false + default: "---" model: description: 'Llama model to use for testing' @@ -43,7 +43,7 @@ on: env: TOKENIZER_PATH: "models/llama3/api/tokenizer.model" MODELS_PATH: '/data/llama3/models' - #API_KEY: ${{ github.event.inputs.api_key }} + API_KEY: ${{ github.event.inputs.api_key }} jobs: execute_workflow: @@ -140,47 +140,47 @@ jobs: #### Run tests #### - #- name: Run Tokenizer tests - # id: run_tests_tokenizer - # working-directory: ${{ github.workspace }} - # if: github.event_name == 'pull_request_target' - # run: | - # echo "[STEP]Running Tokenizer tests on Self-Hosted k8s ARC Runner" - # python3 -m pytest models/llama3/api/test_tokenizer.py - - #- name: Run tool utils tests - # id: run_tests_tool_utils - # if: github.event_name == 'pull_request_target' - # run: | - # echo "[STEP] Running tool utils test on Self-Hosted k8s ARC Runner" - # cd $GITHUB_WORKSPACE && python3 -m unittest models/llama3/tests/api/test_tool_utils.py --junitxml="$GITHUB_WORKSPACE/result.xml" + - name: Run Tokenizer tests + id: run_tests_tokenizer + working-directory: ${{ github.workspace }} + if: github.event_name == 'pull_request_target' + run: | + echo "[STEP]Running Tokenizer tests on Self-Hosted k8s ARC Runner" + python3 -m pytest models/llama3/api/test_tokenizer.py + + - name: Run tool utils tests + id: run_tests_tool_utils + if: github.event_name == 'pull_request_target' + run: | + echo "[STEP] Running tool utils test on Self-Hosted k8s ARC Runner" + cd $GITHUB_WORKSPACE && python3 -m unittest models/llama3/tests/api/test_tool_utils.py --junitxml="$GITHUB_WORKSPACE/result.xml" #### Create test summary #### - #- name: PR - Test Summary - # id: create_test_summary_pr - # if: github.event_name == 'pull_request_target' - # uses: test-summary/action@v2 - # with: - # paths: "${{ github.workspace }}/result.xml" - # output: test-summary.md - - #- name: PR - Upload Test Summary - # id: publish_test_summary_pr - # if: github.event_name == 'pull_request_target' - # uses: actions/upload-artifact@v3 - # with: - # name: test-summary - # path: test-summary.md + - name: PR - Test Summary + id: create_test_summary_pr + if: github.event_name == 'pull_request_target' + uses: test-summary/action@v2 + with: + paths: "${{ github.workspace }}/result.xml" + output: test-summary.md + + - name: PR - Upload Test Summary + id: publish_test_summary_pr + if: github.event_name == 'pull_request_target' + uses: actions/upload-artifact@v3 + with: + name: test-summary + path: test-summary.md #### Update PR request #### - #- name: Update Pull Request with a comment - # id: publish_pr_comment - # if: github.event_name == 'pull_request_target' - # uses: thollander/actions-comment-pull-request@v2 - # with: - # filePath: test-summary.md + - name: Update Pull Request with a comment + id: publish_pr_comment + if: github.event_name == 'pull_request_target' + uses: thollander/actions-comment-pull-request@v2 + with: + filePath: test-summary.md ######################## @@ -189,19 +189,19 @@ jobs: #### Run tests #### - #- name: "Running all PyTest tests on Self-Hosted k8s ARC Runner" - # id: pytest - # working-directory: ${{ github.workspace }} - # if: github.event_name == 'workflow_dispatch' - # run: | - # echo "[STEP] Running PyTest tests at 'GITHUB_WORKSPACE' path: ${GITHUB_WORKSPACE} | path: ${{ github.workspace }}" - # python3 -m pytest --junitxml="${{ github.workspace }}/result.xml" + - name: "Running all PyTest tests on Self-Hosted k8s ARC Runner" + id: pytest + working-directory: ${{ github.workspace }} + if: github.event_name == 'workflow_dispatch' + run: | + echo "[STEP] Running PyTest tests at 'GITHUB_WORKSPACE' path: ${GITHUB_WORKSPACE} | path: ${{ github.workspace }}" + python3 -m pytest --junitxml="${{ github.workspace }}/result.xml" #### Create test summary #### - #- name: Manual - Test Summary - # id: create_test_summary_manual - # if: github.event_name == 'workflow_dispatch' - # uses: test-summary/action@v2 - # with: - # paths: "${{ github.workspace }}/result.xml" + - name: Manual - Test Summary + id: create_test_summary_manual + if: github.event_name == 'workflow_dispatch' + uses: test-summary/action@v2 + with: + paths: "${{ github.workspace }}/result.xml" From 90766d2e88224a7f607234eb9da2e9d096cbb9ee Mon Sep 17 00:00:00 2001 From: Connor Hack Date: Thu, 3 Oct 2024 12:10:26 -0700 Subject: [PATCH 11/11] Update pull request test directory --- .github/workflows/gha_workflow_llama_models_tests.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/gha_workflow_llama_models_tests.yml b/.github/workflows/gha_workflow_llama_models_tests.yml index 5dc0a921..3902c61c 100644 --- a/.github/workflows/gha_workflow_llama_models_tests.yml +++ b/.github/workflows/gha_workflow_llama_models_tests.yml @@ -146,14 +146,7 @@ jobs: if: github.event_name == 'pull_request_target' run: | echo "[STEP]Running Tokenizer tests on Self-Hosted k8s ARC Runner" - python3 -m pytest models/llama3/api/test_tokenizer.py - - - name: Run tool utils tests - id: run_tests_tool_utils - if: github.event_name == 'pull_request_target' - run: | - echo "[STEP] Running tool utils test on Self-Hosted k8s ARC Runner" - cd $GITHUB_WORKSPACE && python3 -m unittest models/llama3/tests/api/test_tool_utils.py --junitxml="$GITHUB_WORKSPACE/result.xml" + python3 -m pytest models/llama3/ --junitxml="${{ github.workspace }}/result.xml" #### Create test summary ####