Residential: add unit tests for BuildResidentialModel #232
Workflow file for this run
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: Example-project CI | |
on: | |
# push: | |
schedule: | |
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule | |
# 5 am UTC (11pm MDT the day before) every weekday night in MDT | |
- cron: '* 5 * * 0' | |
pull_request: | |
types: [review_requested] | |
env: | |
# This env var should enforce develop branch of all dependencies | |
FAVOR_LOCAL_GEMS: true | |
GEM_DEVELOPER_KEY: ${{ secrets.GEM_DEVELOPER_KEY }} | |
jobs: | |
simulate-and-post-process: | |
strategy: | |
matrix: | |
scenario: [baseline, chilled_water_storage, flexible_hot_water, high_efficiency, mixed, | |
peak_hours_mels_shedding, peak_hours_thermostat_adjust, reopt, thermal_storage] | |
runs-on: ubuntu-latest | |
container: | |
image: docker://nrel/openstudio:3.7.0 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Update gems | |
run: | | |
bundle update | |
bundle exec certified-update | |
- name: Test residential measure variations | |
run: bundle exec rake residential:measure_tests | |
- name: Simulate | |
run: bundle exec rake run_${{ matrix.scenario }} | |
- name: Post process | |
run: bundle exec rake post_process_${{ matrix.scenario }} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
# Only upload if something fails | |
if: failure() | |
with: | |
name: rspec_results | |
path: example_project/run/${{ matrix.scenario }}_scenario/ | |
retention-days: 7 # save for 1 week before deleting - useful for debugging |