ansys / ansys-templates

A tool for creating new projects according to Ansys guidelines
https://templates.ansys.com
MIT License
11 stars 4 forks source link

Bug: `smoke-tests` should be named `build-wheelhouse` in the common `ci_cd.yml` template #491

Open anscfrisson opened 3 months ago

anscfrisson commented 3 months ago

🔍 Before submitting the issue

🐞 Description of the bug

From src/ansys/templates/python/common/{{cookiecutter.__project_name_slug}}/.github/workflows/ci_cd.yml#L52:

smoke-tests:
    name: "Build and Smoke tests"
    runs-on: {{ '${{ matrix.os }}' }}
    needs: [code-style]
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, windows-latest]
        {% set required_minor = cookiecutter.__requires_python[2:] | int %}
        {%- set python_versions = [ ] -%}
        {%- for minor in range(9, 13) -%}
        {%- if minor >= required_minor -%}
        {{ python_versions.append("3." + minor | string ) or ''}}
        {%- endif -%}
        {%- endfor -%}
        python-version: {{ python_versions }}
    steps:
      - uses: ansys/actions/build-wheelhouse@v6
        with:
          library-name: {{ '${{ env.LIBRARY_NAME }}' }}
          operating-system: {{ '${{ matrix.os }}' }}
          python-version: {{ '${{ matrix.python-version }}' }}

  tests:
    name: "Tests"
    runs-on: {{ '${{ matrix.os }}' }}
    needs: [smoke-tests]

Job smoke-tests only performs action build-wheelhouse, so job should be renamed accordingly into build-wheelhouse to avoid confusion. Then tests updated with needs: [build-wheelhouse].

📝 Steps to reproduce

Create a new project with any template.

💻 Which operating system are you using?

Windows

🐍 Which Python version are you using?

3.10

📦 Installed packages

Does not matter.
anscfrisson commented 3 months ago
  • [x] I have searched among the existing issues

https://github.com/search?q=repo%3Aansys%2Fansys-templates+smoke-tests&type=issues yields:

https://github.com/ansys/ansys-templates/issues/11#issuecomment-1073665587 by @jorgepiloto

Code coverage was introduced in #18. In addition, the CI was parametrized again by splitting smoke and templates tests. Closing this...

But I am not finding matches of smoke-tests in https://github.com/ansys/ansys-templates/pull/18/files