Skip to content

Commit

Permalink
Activate the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ansjhenry committed Feb 19, 2024
1 parent 0a8789d commit e15d4e6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,13 @@ jobs:
target-dir: '.venvs'
target-name: ${{ steps.get-scade-python.outputs.python-name }}

# no test application for now
# - name: Execute tests
# uses: ./scade-tests-pytest
# with:
# python-dir: ${{ steps.create-scade-venv.outputs.scripts-dir }}
# checkout: false
- name: Execute tests
uses: ./scade-tests-pytest
with:
python-dir: ${{ steps.create-scade-venv.outputs.scripts-dir }}
library-dir: "tests/python"
pytest-postargs: "tests/python/tests -vv"
checkout: false

doc-deploy-dev:
name: "Deploy developers documentation"
Expand Down
14 changes: 10 additions & 4 deletions scade-tests-pytest/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ inputs:
required: true

# Optional inputs
library-dir:
description: >
Directory of the library to test.
default: '.'
required: false

pytest-markers:
description: >
Set of `pytest markers
Expand Down Expand Up @@ -75,15 +81,15 @@ runs:
- name: "Install Python library"
shell: cmd
run: |
%PYTHON_EXE% -m pip install .
%PYTHON_EXE% -m pip install ${{ inputs.library-dir }}
- name: "Check if requirements.txt file exists"
- name: "Check if requirements_tests.txt file exists"
shell: cmd
run: |
:: Add the requirements
if exist requirements/requirements_tests.txt (
if exist ${{ inputs.library-dir }}/requirements/requirements_tests.txt (
echo Install test dependencies from the requirements file
%PYTHON_EXE% -m pip install -r requirements/requirements_tests.txt
%PYTHON_EXE% -m pip install -r ${{ inputs.library-dir }}/requirements/requirements_tests.txt
)
# - name: "Install test dependencies from pyproject.toml"
Expand Down

0 comments on commit e15d4e6

Please sign in to comment.