Skip to content

Commit

Permalink
apply changes to dev tests to tests on master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
jthurner committed Dec 6, 2024
1 parent a16f6e3 commit fa8f05c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 30 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/run_tests_develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# A coverage report will be created for the Python 3.9 version
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions


name: ppipes_dev

on:
Expand Down Expand Up @@ -118,6 +117,6 @@ jobs:
- name: Check sphinx build
uses: ammaraskar/[email protected]
with:
pre-build-command: "python -m pip install uv && uv pip install .[docs] --system"
pre-build-command: "python -m pip install uv && uv pip install .[docs] --system --link-mode=copy"
build-command: "sphinx-build -b html source _build -W"
docs-folder: "doc/"
50 changes: 22 additions & 28 deletions .github/workflows/run_tests_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,23 @@ jobs:
os: [ ubuntu-latest, windows-latest ]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a #v4.2.0
with:
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .["all"]
shell: bash
- name: List all installed packages
run: |
python -m pip list
run: uv sync --extra test
- name: Test with pytest
if: ${{ matrix.python-version != '3.11' }}
run: |
python -m pytest
uv run pytest -n auto
- name: Test with pytest, Codecov and Coverage
if: ${{ matrix.python-version == '3.11' }}
run: |
python -m pip install pytest-cov
python -m pytest --nbmake -n auto --cov=./ --cov-report=xml
uv pip install pytest-cov
uv run pytest --nbmake -n auto --cov=./ --cov-report=xml
cp ./coverage.xml ./codecov_coverage.xml
- name: Upload coverage to Codacy
if: ${{ matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest'}}
Expand All @@ -66,9 +62,8 @@ jobs:
- name: Test without numba
if: ${{ matrix.python-version == '3.11' }}
run: |
python -m pip uninstall numba -y
python -m pytest -n auto
uv pip uninstall numba
uv run pytest -n auto
relying:
runs-on: ${{ matrix.os }}
Expand All @@ -78,27 +73,26 @@ jobs:
os: [ ubuntu-latest, windows-latest ]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a #v4.2.0
with:
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .["all"]
shell: bash
- name: List all installed packages
run: |
python -m pip list
uv sync --extra test
uv pip install git+https://github.com/e2nIEE/pandapower@develop#egg=pandapower
- name: Test with pytest
# if: ${{ matrix.python-version != '3.11' }}
if: ${{ matrix.python-version != '3.11' }}
run: |
python -m pytest -n auto
uv run pytest -n auto
- name: Test without numba
if: ${{ matrix.python-version == '3.11' }}
run: |
python -m pip uninstall numba -y
python -m pytest -n auto
uv pip uninstall numba
uv run pytest -n auto
tutorial_tests:
name: Tutorial tests
Expand Down Expand Up @@ -136,6 +130,6 @@ jobs:
- name: Check sphinx build
uses: ammaraskar/[email protected]
with:
pre-build-command: "python -m pip install .[docs]"
pre-build-command: "python -m pip install uv && uv pip install .[docs] --system --link-mode=copy"
build-command: "sphinx-build -b html source _build -W"
docs-folder: "doc/"

0 comments on commit fa8f05c

Please sign in to comment.