Skip to content

Remove debugging step #6

Remove debugging step

Remove debugging step #6

Workflow file for this run

name: test
on: [pull_request, push]
jobs:
pytest:
runs-on: ubuntu-latest
strategy:
fail-fast: false # don't cancel other matrix jobs when one fails
matrix:
python-version: ["3.8","3.11"]
# Test two environments:
# 1) dependencies with pinned versions from requirements.txt
# 2) 'pip install --upgrade --upgrade-strategy=eager .' to install upgraded
# dependencies from PyPi using version ranges defined within setup.py
env: [
'-r requirements.txt .[all]',
'--upgrade --upgrade-strategy=eager .[all]'
]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Radiance v5.3
run: |
wget https://github.com/LBNL-ETA/Radiance/releases/download/012cb178/Radiance_012cb178_Linux.zip -O radiance.zip
unzip radiance.zip
tar -xvf radiance-5.3.012cb17835-Linux.tar.gz
ls -l $PWD
- name: Copy gencumulativesky into radiance /bin
run: |
cp $PWD/bifacial_radiance/data/gencumulativesky $PWD/radiance-5.3.012cb17835-Linux/usr/local/radiance/bin/
- name: Install SMARTS 2.9.5
run: |
wget https://www.nrel.gov/grid/solar-resource/assets/data/smarts-295-linux-tar.gz -O /tmp/smarts.tar.gz
tar -xvf /tmp/smarts.tar.gz
unlink $PWD/SMARTS_295_Linux/smarts295bat
sed -i 's/batch=.FALSE./batch=.TRUE./g' $PWD/SMARTS_295_Linux/Source_code/smarts295.f
sudo apt-get install gfortran
gfortran -o $PWD/SMARTS_295_Linux/smarts295bat $PWD/SMARTS_295_Linux/Source_code/smarts295.f
ls -l $PWD/SMARTS_295_Linux/
- name: Install ${{ matrix.env }}
run: |
pip install ${{ matrix.env }}
pip install coveralls wheel
- name: Set environment variables
run: |
# https://docs.github.com/en/actions/learn-github-actions/workflow-commands-for-github-actions#adding-a-system-path
echo "/home/runner/work/bifacial_radiance/bifacial_radiance/radiance-5.3.012cb17835-Linux/usr/local/radiance/bin" >> $GITHUB_PATH
echo "/home/runner/work/bifacial_radiance/bifacial_radiance/SMARTS_295_Linux" >> $GITHUB_PATH
- name: Test with pytest ${{ matrix.env }}
uses: coactions/setup-xvfb@6b00cf1889f4e1d5a48635647013c0508128ee1a # GUI testing requires xvfb
with:
run: |
pytest --cov=bifacial_radiance
env: # environment variables available to this step
RAYPATH: .:/home/runner/work/bifacial_radiance/bifacial_radiance/radiance-5.3.012cb17835-Linux/usr/local/radiance/lib
SMARTSPATH: /home/runner/work/bifacial_radiance/bifacial_radiance/SMARTS_295_Linux
- name: Coveralls
continue-on-error: true #prevent coveralls from blowing the test report
if: matrix.python-version == 3.11 # && ${{ matrix.env }} == '-r requirements.txt .[all]'
run: |
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}