Create Rule5-1.md #4135
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
# This workflow will check formatting with Black, install Python dependencies, | |
# and run tests with pytest | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
# Apply this workflow when creating a pull request or pushing a commit to a PR | |
on: pull_request | |
jobs: | |
black-formatting-check: | |
name: Black formatting check | |
runs-on: 'ubuntu-latest' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
# This will halt the action if formatting fails | |
# Note: This will also fail if there are syntax errors | |
- uses: psf/black@stable | |
with: | |
version: "22.6.0" | |
run-unit-tests: | |
name: Run unit tests | |
runs-on: 'ubuntu-latest' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.7' | |
cache: 'pipenv' | |
- name: Install pipenv | |
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python | |
- name: Install dependencies | |
run: pipenv install --dev | |
- name: Run pytests | |
# This will halt the action if any of the tests fail | |
run: pipenv run pytest -v | |
- name: Run rule tests | |
run: pipenv run rct229 test -rs ashrae9012019 |