Skip to content

Commit

Permalink
fix tox to use correct branch in release tags (#1710)
Browse files Browse the repository at this point in the history
* fix tox to use correct branch in release tags

* use git branch show-current to get current branch

* adding quotes to check string format

* change method of collecting branch name

* separating expressions

* adding newline expressions
  • Loading branch information
jperez999 committed Nov 23, 2022
1 parent 443b5b7 commit 5ad6891
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/cpu-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,14 @@ jobs:
tox -e lint
- name: Run tests
run: |
tox -e test-cpu
ref_type=${{ github.ref_type }}
branch=main
if [[ $ref_type == "tag"* ]]
then
raw=$(git branch -r --contains ${{ github.ref_name }})
branch=${raw/origin\/}
fi
tox -e test-cpu -- $branch
- name: Generate package for pypi
run: |
python setup.py sdist bdist_wheel
Expand Down
7 changes: 4 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ commands =
; change the tensorflow dependency to `tensorflow-macos` in requirements/test-cpu.txt.
deps = -rrequirements/test.txt
commands =
python -m pip install --upgrade git+https://github.com/NVIDIA-Merlin/core.git
python -m pip install --upgrade git+https://github.com/NVIDIA-Merlin/dataloader.git
python -m pip install --upgrade git+https://github.com/NVIDIA-Merlin/models.git
echo {posargs:main}
python -m pip install --upgrade git+https://github.com/NVIDIA-Merlin/core.git@{posargs:main}
python -m pip install --upgrade git+https://github.com/NVIDIA-Merlin/dataloader.git@{posargs:main}
python -m pip install --upgrade git+https://github.com/NVIDIA-Merlin/models.git@{posargs:main}
python -m pytest --cov-report term --cov=merlin -rxs tests/unit

[testenv:test-gpu]
Expand Down

0 comments on commit 5ad6891

Please sign in to comment.