Skip to content

Commit

Permalink
fix: run pytest manually in actions
Browse files Browse the repository at this point in the history
  • Loading branch information
tmpbeing committed Dec 25, 2023
1 parent 24be5bc commit fe4cff3
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,21 @@ jobs:
steps:
- name: Setup PDM
uses: pdm-project/setup-pdm@v3
- uses: actions/checkout@v3
- name: Generate test requirements
run: mkdir requirements && pdm export -G test --no-default -o requirements/requirements_tests.txt
- uses: ansys/actions/tests-pytest@v5
with:
pytest-extra-args: "--cov=ansys --cov-report=term --cov-report=html:.cov/html"
- uses: actions/checkout@v4
- name: Install dependencies
run: pdm install --dev
- name: Activate venv
run: eval $(pdm venv activate)
- name: run tests
run: pytest --cov=ansys --cov-report=term --cov-report=html:.cov/html tests -vv
# TODO: Can't use current version of ansys/actions/tests-pytest
# Possibly because it checksout and overwrites the repo, removing requirements file
# previously created so we use pytest directly
# - name: Generate test requirements
# run: mkdir requirements && pdm export -G test --no-default -o requirements/requirements_tests.txt
# - uses: ansys/actions/tests-pytest@v5
# with:
# pytest-extra-args: "--cov=ansys --cov-report=term --cov-report=html:.cov/html"

doc-build:
name: "Build documentation"
Expand All @@ -75,7 +84,7 @@ jobs:
steps:
- name: Setup PDM
uses: pdm-project/setup-pdm@v3
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Generate doc requirements
run: pdm export -G doc --no-default -o doc_requirements.txt
- uses: ansys/actions/doc-build@v5
Expand Down

0 comments on commit fe4cff3

Please sign in to comment.