Skip to content

Commit

Permalink
update test_pkg.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dguittet committed May 6, 2024
1 parent 44c49c0 commit 8a36844
Showing 1 changed file with 54 additions and 1 deletion.
55 changes: 54 additions & 1 deletion .github/workflows/test_pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-14-large]
os: [ubuntu-latest, windows-latest]
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]

env:
Expand Down Expand Up @@ -107,6 +107,59 @@ jobs:
git config --global url.https://github.com/.insteadOf git://github.com/
git clone https://github.com/NREL/SAM.git
- name: Unit tests
run: |
source /Users/runner/.bash_profile
conda activate pysam_env
pytest tests
build_3:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-14-large]
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]

env:
SAMNTDIR: ${{ github.workspace }}/../SAM
NREL_API_KEY: ${{ secrets.NREL_API_KEY }}
NREL_API_EMAIL: ${{ secrets.NREL_API_EMAIL }}

name: ${{ matrix.os }} ${{ matrix.python-version }}
steps:
- name: Install conda Mac Intel
run: |
mkdir -p ~/miniconda3
curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o ~/miniconda3/miniconda.sh
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
rm -rf ~/miniconda3/miniconda.sh
~/miniconda3/bin/conda init bash
source /Users/runner/.bash_profile
conda --version
yes | conda create --name pysam_env python=${{ matrix.python-version }}
conda activate pysam_env
which python
- name: Checkout Repo
uses: actions/checkout@v3

- name: Install NREL-PySAM
run: |
source /Users/runner/.bash_profile
conda activate pysam_env
VER=$(python -c "from files.version import __version__; print(__version__)")
echo $VER
pip install -r requirements.txt
pip install -r tests/requirements.txt
conda install -c nrel nrel-pysam==$VER
- 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
- name: Unit tests
run: |
source /Users/runner/.bash_profile
Expand Down

0 comments on commit 8a36844

Please sign in to comment.