Skip to content

Commit

Permalink
testing with all code (might be able to delete some later)
Browse files Browse the repository at this point in the history
  • Loading branch information
robinsteuteville committed Feb 23, 2024
1 parent 1922688 commit e4fd9a8
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 21 deletions.
27 changes: 15 additions & 12 deletions .github/workflows/py-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ jobs:
call-rust-tests:
uses: nrel/fastsim/.github/workflows/rust-tests.yaml@main
test:
# might not be needed
# if: github.repository == 'nrel/fastsim'
needs: call-rust-tests
# add in if first step works
# if: ${{ github.repository == 'nrel/fastsim' }}
Expand All @@ -34,6 +32,7 @@ jobs:

env:
PYTHON: ${{ matrix.python-version }}

steps:
- uses: actions/checkout@v3

Expand All @@ -43,18 +42,22 @@ jobs:
python-version: ${{ matrix.python-version }}

# not sure if this is needed if I'm only running python tests
# - name: install rust
# uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# toolchain: stable
# override: true
- name: install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: Python unit tests
- name: Rust unit tests
run: |
pip install -e ".[dev]" && pytest -v python/fastsim/tests/
pytest -v python/fastsim/demos/
cd rust/ && cargo test
# in altrios, also includes Rust tests here -- but I think this would mean
# Rust and Python tests are always run (so, even if only python code is
# modified)
# modified)

- name: Python unit tests
run: |
pip install -e ".[dev]" && pytest -v python/fastsim/tests/
pytest -v python/fastsim/demos/
24 changes: 15 additions & 9 deletions .github/workflows/rust-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,19 @@ jobs:

strategy:
fail-fast: true
# matrix:
# python-version: ['3.8', '3.9', '3.10']
matrix:
python-version: ['3.8', '3.9', '3.10']

env:
PYTHON: ${{ matrix.python-version }}

# env:
# PYTHON: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3

# - name: set up python ${{ matrix.python-version }}
# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}
- name: set up python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

# if: contains(github.event.pull_request.changed_files, 'rust/')
- name: install rust
Expand All @@ -46,4 +47,9 @@ jobs:
cd rust/ && cargo test
# in altrios, also includes python tests here, not sure I
# understand what added benefit this gives
# understand what added benefit this gives

- name: Python unit tests
run: |
pip install -e ".[dev]" && pytest -v python/fastsim/tests/
pytest -v python/fastsim/demos/

0 comments on commit e4fd9a8

Please sign in to comment.