Develop #150
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: Build and test | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
# run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
test_ubuntu: | |
runs-on: ubuntu-latest | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.10"] | |
steps: | |
- name: Checkout frads | |
uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Download latest EnergyPlus | |
run: gh release download -R NREL/EnergyPlus -p '*Ubuntu20*.tar.gz' | |
- name: Install EnergyPlus | |
run: | | |
ls | |
tar -xvf EnergyPlus*Ubuntu*.tar.gz | |
rm EnergyPlus*.tar.gz | |
mv EnergyPlus* EnergyPlus | |
ls | |
- name: Install frads | |
run: | | |
pip install . | |
- name: Run tests | |
run: | | |
export PATH=$PATH:${{ github.workspace }}/EnergyPlus | |
energyplus --version | |
pip install pytest | |
pytest test | |
test_osx: | |
runs-on: macos-latest | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.10"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Download latest EnergyPlus | |
run: gh release download -R NREL/EnergyPlus -p '*macOS11*.tar.gz' | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install EnergyPlus | |
run: | | |
tar -xvf EnergyPlus*macOS*.tar.gz | |
ls | |
rm EnergyPlus*.tar.gz | |
mv EnergyPlus*macOS* EnergyPlus | |
ls | |
export PATH=$PATH:${{ github.workspace }}/EnergyPlus | |
- name: Install frads | |
run: | | |
pip install . | |
- name: Run tests | |
run: | | |
export PATH=$PATH:${{ github.workspace }}/EnergyPlus | |
energyplus --version | |
pip install pytest | |
pytest test | |
test_windows: | |
runs-on: windows-latest | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [3.8, "3.10"] | |
defaults: | |
run: | |
shell: cmd | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Download latest EnergyPlus | |
run: gh release download -R NREL/EnergyPlus -p "*Windows*.zip" | |
- name: Install EnergyPlus | |
run: | | |
unzip EnergyPlus*Windows*.zip | |
del /f EnergyPlus*.zip | |
move "EnergyPlus*" EnergyPlus | |
ls | |
- name: Install frads | |
run: | | |
pip install . | |
- name: Run tests | |
run: | | |
set PATH=%PATH%;${{ github.workspace }}\EnergyPlus | |
pip install pytest | |
pytest |