Skip to content

Commit

Permalink
Fixing examples testing(#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
phoebe-p authored Jul 16, 2024
1 parent d80c52a commit e2df45f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 22 deletions.
26 changes: 5 additions & 21 deletions .github/workflows/test_unit_and_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-12, windows-latest, macos-latest]
os: [ubuntu-latest, macos-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]
exclude:
- os: macos-14
- os: macos-latest
python-version: 3.9
- os: macos-13
- os: macos-latest
python-version: 3.9

steps:
Expand All @@ -140,12 +140,6 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: install-rtools
if: matrix.os == 'windows-latest'
run: |
choco install rtools --version=4.0.0.20220206 --no-progress --force
echo "c:\rtools40\ucrt64\bin;" >> $env:GITHUB_PATH
- name: Install system dependencies in Linux
if: matrix.os == 'ubuntu-latest'
run: |
Expand All @@ -158,16 +152,6 @@ jobs:
brew reinstall gfortran openblas pkg-config
brew install ngspice boost suite-sparse
- name: Install system dependencies in MacOS (Intel)
if: matrix.os == 'macos-12'
run: |
brew reinstall gfortran
brew install ngspice
- name: Install system dependencies in Windows
if: matrix.os == 'windows-latest'
run: choco install ngspice

- name: Install Python dependecies
run: |
pip install --upgrade pip
Expand All @@ -178,7 +162,7 @@ jobs:
python3 -m spin install-dependencies -test-dep
- name: Install S4 (macOS - arm)
if: matrix.os == 'macos-14'
if: matrix.os == 'macos-latest'
run: |
pip install wheel setuptools
git clone https://github.com/phoebe-p/S4
Expand Down Expand Up @@ -206,4 +190,4 @@ jobs:
env:
SOLCORE_SPICE: ngspice
run: |
python -m spin test -- -r a -v tests/test_examples.py -n "auto"
python -m spin test -- -r a -v solcore/tests/test_examples.py -n "auto"
2 changes: 1 addition & 1 deletion tests/test_depletion_approximation.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def bc(ya, yb):
xa, xb, gen_prof, D, L, minority, s, wl, phg, side="top"
)

assert result == approx(expected, rel=1e-5)
assert result == approx(expected, rel=1e-4)


def test_get_J_sc_diffusion_bottom():
Expand Down

0 comments on commit e2df45f

Please sign in to comment.