Skip to content

Example-project CI #416

Example-project CI

Example-project CI #416

Workflow file for this run

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
# We only need to run the residential measure_tests once, not for every iteration
if: matrix.scenario == 'baseline'
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_${{ matrix.scenario }}
path: example_project/run/${{ matrix.scenario }}_scenario/
retention-days: 7 # save for 1 week before deleting - useful for debugging