RNM-gem CI #91
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: RNM-gem CI | |
on: | |
# push: | |
schedule: | |
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule | |
# 5:23 am UTC (11:23pm MDT the day before) every weekday night in MDT | |
- cron: '23 5 * * 2-6' | |
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: | |
weeknight-tests: | |
runs-on: ubuntu-latest | |
container: | |
image: docker://nrel/openstudio:3.7.0 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: set git config options | |
shell: bash | |
run: | | |
git config --global --add safe.directory '*' | |
- name: Update gems | |
run: | | |
ruby --version | |
bundle update | |
bundle exec certified-update | |
- name: Run Rspec | |
run: bundle exec rspec | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
# Only upload if rspec fails | |
if: ${{ failure() }} | |
with: | |
name: rspec_results | |
path: | | |
spec/test*/** | |
# coverage/ | |
retention-days: 7 # save for 1 week before deleting | |
# coveralls action docs: https://github.com/marketplace/actions/coveralls-github-action | |
- name: Coveralls GitHub Action | |
uses: coverallsapp/github-action@v2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: "./coverage/lcov/urbanopt-rnm-us-gem.lcov" |