maint: Test improvements #37
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: MAPDL dependent tests for paths tool | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - "*" | |
| branches: | |
| - main | |
| env: | |
| PACKAGE_NAME: ansys-tools-common | |
| MAIN_PYTHON_VERSION: 3.13 | |
| jobs: | |
| build-tests: | |
| name: Build and Testing | |
| runs-on: ubuntu-22.04 | |
| container: | |
| image: ghcr.io/ansys/pymapdl/mapdl:v22.2-ubuntu | |
| options: "-u=0:0 --entrypoint /bin/bash" | |
| credentials: | |
| username: ${{ secrets.GH_USERNAME }} | |
| password: ${{ secrets.GH_TOKEN }} | |
| env: | |
| ANSYS_LOCAL: true | |
| ON_UBUNTU: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.MAIN_PYTHON_VERSION }} | |
| - name: Install library, with test extra | |
| run: | | |
| python -m pip install .[tests] | |
| python -m pip install tests/launcher/pkg_with_entrypoint | |
| - name: Unit testing | |
| run: | | |
| python -m pytest -vx --cov=${{ env.PACKAGE_NAMESPACE }} --cov-report=term --cov-report=xml:.cov/coverage.xml --cov-report=html:.cov/html | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: .cov/coverage.xml |