From b6d870f4c85861d68dc1e222900cc2d84b4720c4 Mon Sep 17 00:00:00 2001 From: dhuangnm Date: Fri, 13 Sep 2024 12:18:04 -0400 Subject: [PATCH] seperate install and test steps --- .github/actions/test/action.yml | 38 +++++++++++++++++---------------- .github/workflows/upload.yml | 1 - 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index 8e8ba137..44d04b41 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -11,21 +11,23 @@ outputs: runs: using: composite steps: - - id: test - run: | - # install wheel - source ${{ inputs.venv }}/bin/activate - python --version - WHL=$(find . -type f -iname "compressed*.whl") - pip install ${WHL}[dev,accelerate] - version=$(pip freeze | grep compressed) - echo "installed ${version}" - SUCCESS=0 - # run test - echo "running tests..." - rm -rf src - pytest tests --junitxml=test-results/report.xml || SUCCESS=$? - echo "status=${SUCCESS}" >> "$GITHUB_OUTPUT" - deactivate - exit ${SUCCESS} - shell: bash + + - name: install wheel + uses: neuralmagic/nm-actions/actions/install-whl@newadd + with: + venv: ${{ inputs.venv }} + name: compressed + extra: "[dev,accelerate]" + + - name: test + id: test + run: | + source ${{ inputs.venv }}/bin/activate + SUCCESS=0 + echo "running tests..." + rm -rf src + pytest tests --junitxml=test-results/report.xml || SUCCESS=$? + echo "status=${SUCCESS}" >> "$GITHUB_OUTPUT" + deactivate + exit ${SUCCESS} + shell: bash diff --git a/.github/workflows/upload.yml b/.github/workflows/upload.yml index 6c8866d8..030546c1 100644 --- a/.github/workflows/upload.yml +++ b/.github/workflows/upload.yml @@ -78,7 +78,6 @@ jobs: - name: download assets uses: neuralmagic/nm-actions/actions/gcp-download-assets@v1.1.0 with: - #bucket_source: "gs://compressed-tensors/assets" bucket_source: ${{ secrets.GCP_BUILD_ML_ASSETS2 }} run_id: ${{ inputs.run_id }}