Skip to content

Commit

Permalink
Putting back CI changes
Browse files Browse the repository at this point in the history
  • Loading branch information
johnjasa committed Nov 12, 2024
1 parent e37dcd0 commit 9410087
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
21 changes: 18 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,22 @@ jobs:
build:

runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
- uses: actions/checkout@v4
- name: Set up Miniconda Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
channels: conda-forge
activate-environment: greenheart-test-${{ matrix.python-version }}
- name: Install dependencies
env:
SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL: True
Expand All @@ -28,6 +34,15 @@ jobs:
touch .env
# echo NREL_API_KEY=${{ secrets.NREL_API_KEY }} >> .env
# cat .env
- name: Save environment build details
run: |
mkdir ~/artifacts
conda env export --file ~/artifacts/environment.yml
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.python-version }}-environment
path: ~/artifacts/environment.yml
- name: Run tests
run: |
PYTHONPATH=. pytest tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def test_system_power_report(self):
comp = Compressor(p_outlet, flow_rate_kg_per_day, p_inlet=p_inlet, n_compressors=n_compressors, sizing_safety_factor=sizing_safety_factor)
comp.compressor_power()
_motor_rating, total_system_power = comp.compressor_system_power()
assert total_system_power == 3627.3907562149357
assert total_system_power == approx(3627.3907562149357)

def test_max_flow_rate_per_compressor(self):
p_inlet = 20 # bar
Expand Down

0 comments on commit 9410087

Please sign in to comment.