diff --git a/.github/workflows/py-tests.yaml b/.github/workflows/py-tests.yaml index 446590bc..16a9935d 100644 --- a/.github/workflows/py-tests.yaml +++ b/.github/workflows/py-tests.yaml @@ -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' }} @@ -34,6 +32,7 @@ jobs: env: PYTHON: ${{ matrix.python-version }} + steps: - uses: actions/checkout@v3 @@ -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) \ No newline at end of file + # modified) + + - name: Python unit tests + run: | + pip install -e ".[dev]" && pytest -v python/fastsim/tests/ + pytest -v python/fastsim/demos/ \ No newline at end of file diff --git a/.github/workflows/rust-tests.yaml b/.github/workflows/rust-tests.yaml index ae30df36..4875aeff 100644 --- a/.github/workflows/rust-tests.yaml +++ b/.github/workflows/rust-tests.yaml @@ -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 @@ -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 \ No newline at end of file + # 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/ \ No newline at end of file