CI: add deploy_docs.yml #158
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: wget https://github.com/taoning/pyenergyplus/releases/download/v23.1.0/pyenergyplus-23.1.0-py3-none-manylinux1_x86_64.whl | |
- name: Install EnergyPlus | |
run: pip install pyenergyplus-23.1.0-py3-none-manylinux1_x86_64.whl | |
- name: Install frads | |
run: | | |
pip install . | |
- name: Run tests | |
run: | | |
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: curl -L "https://github.com/taoning/pyenergyplus/releases/download/v23.1.0/pyenergyplus-23.1.0-py3-none-macosx_10_13_x86_64.whl" -o "pyenergyplus-23.1.0-py3-none-macosx_10_13_x86_64.whl" | |
- name: Install EnergyPlus | |
run: pip install pyenergyplus-23.1.0-py3-none-macosx_10_13_x86_64.whl | |
- name: Install frads | |
run: | | |
pip install . | |
- name: Run tests | |
run: | | |
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: bitsadmin /transfer myDownloadJob /download /priority normal "https://github.com/taoning/pyenergyplus/releases/download/v23.1.0/pyenergyplus-23.1.0-py3-none-win_amd64.whl" "%CD%\pyenergyplus-23.1.0-py3-none-win_amd64.whl" | |
- name: Install EnergyPlus | |
run: pip install pyenergyplus-23.1.0-py3-none-win_amd64.whl | |
- name: Install frads | |
run: | | |
pip install . | |
- name: Run tests | |
run: | | |
pip install pytest | |
pytest |