update yml #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Package | |
on: [ push ] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ] | |
env: | |
SAMNTDIR: ${{ github.workspace }}/../SAM | |
name: ${{ matrix.os }} ${{ matrix.python-version }} | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- uses: actions/checkout@v3 | |
- name: Checkout SAM | |
run: | | |
cd .. | |
git config --global url.https://github.com/.insteadOf git://github.com/ | |
git clone https://github.com/NREL/SAM.git | |
ls | |
pwd | |
ls ${{ env.SAMNTDIR }} | |
ls ${{ env.SAMNTDIR }}/api/api_autogen/library/defaults | |
- uses: actions/checkout@v3 | |
- name: Setup conda | |
uses: s-weigand/setup-conda@v1 | |
with: | |
update-conda: true | |
python-version: ${{ matrix.python-version }} | |
conda-channels: anaconda, conda-forge | |
- run: conda --version | |
- run: which python | |
- name: Install NREL-PySAM | |
run: | | |
pip install -r requirements.txt | |
pip install -r tests/requirements.txt | |
conda install -c nrel nrel-pysam | |
- name: Unit tests | |
run: | | |
pwd | |
ls ${{ env.SAMNTDIR }}/api/api_autogen/library/defaults | |
pytest tests/test_pysam_all.py |