Skip to content

Commit

Permalink
fix: combine the requirement action
Browse files Browse the repository at this point in the history
  • Loading branch information
Revathyvenugopal162 committed Feb 21, 2024
1 parent c761529 commit 3b743be
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions tests-pytest/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,14 @@ runs:
- name: "Check if requirements_tests.txt file exists"
shell: cmd
run: |
:: Add the requirements
if exist ${{ inputs.library-dir }}/requirements/requirements_tests.txt (
echo Install test dependencies from the requirements file
%PYTHON_EXE% -m pip install -r ${{ inputs.library-dir }}/requirements/requirements_tests.txt
:: Check if requirements_tests.txt file exists
if exist %GITHUB_WORKSPACE%\${{ inputs.library-dir }}/requirements/requirements_tests.txt (
echo Installing test dependencies from requirements_tests.txt
%PYTHON_EXE% -m pip install -r %GITHUB_WORKSPACE%\${{ inputs.library-dir }}/requirements/requirements_tests.txt
) else (
echo Installing test dependencies from pyproject.toml
%PYTHON_EXE% -m pip install %GITHUB_WORKSPACE%\${{ inputs.library-dir }}[tests]
)
echo EXISTS_TESTS_REQUIREMENTS='true'>> %GITHUB_ENV%
- name: "Install test dependencies from pyproject.toml"
shell: cmd
if: env.EXISTS_TESTS_REQUIREMENTS != 'true'
run: |
:: Add the requirements from pyproject.toml
%PYTHON_EXE% -m pip install ${{ inputs.library-dir }}[tests]
- name: "Executing test suite"
shell: cmd
Expand Down

0 comments on commit 3b743be

Please sign in to comment.