Release 0.3.0 #46
This file contains hidden or 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: Testing | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| # Cache the installation of Poetry itself, e.g. the next step. This prevents the workflow | |
| # from installing Poetry every time which can be slow | |
| - name: Cache Poetry install | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.local | |
| key: poetry-${{ runner.os }}-${{ matrix.python-version }}-1.4.2 | |
| # Install Poetry | |
| - uses: snok/install-poetry@v1 | |
| with: | |
| version: 1.4.2 | |
| virtualenvs-create: true | |
| virtualenvs-in-project: true | |
| # Cache your dependencies | |
| - name: Cache deps | |
| id: cache-deps | |
| uses: actions/cache@v4 | |
| with: | |
| path: .venv | |
| key: pydeps-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
| # Install dependencies | |
| - run: poetry install --no-interaction --no-root | |
| if: steps.cache-deps.outputs.cache-hit != 'true' | |
| # Now install _your_ project | |
| - run: poetry install --no-interaction | |
| # And finally run tests | |
| # Need to grab the IDD file for the tests to run, and we don't want to include it in the repo, so we download it here | |
| - name: Download Energy+ IDD file | |
| run: wget https://raw.githubusercontent.com/NREL/EnergyPlus/2ad5b542c761abde2179225b08ce7af0b94a5d3b/idd/versions/V8-9-0-Energy%2B.idd -O test.idd | |
| - name: Run Tests | |
| env: | |
| IDD_FILE: ${{ github.workspace }}/test.idd | |
| run: poetry run python -m unittest -v | |
| - name: Build Docs | |
| if: matrix.python-version == '3.13' | |
| run: poetry run sphinx-build -n -b html docs/source docs/build/html |