Skip to content

Commit

Permalink
seperate install and test steps
Browse files Browse the repository at this point in the history
  • Loading branch information
dhuangnm authored and dhuangnm committed Sep 13, 2024
1 parent 8d4a335 commit b6d870f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 19 deletions.
38 changes: 20 additions & 18 deletions .github/actions/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion .github/workflows/upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down

0 comments on commit b6d870f

Please sign in to comment.