Skip to content

Weather morpher

Weather morpher #313

Workflow file for this run

name: CI
# Runs unit and integration tests
# Only triggered on source code and dependency updates
on:
pull_request:
types: [opened, synchronize, ready_for_review]
branches: [master, release-**]
# Ignore changes in the interfaces directory since they do not have tests
# TODO: Add tests for interfaces module
paths: ['cea/**', 'pyproject.toml', 'pixi.lock', '!cea/interfaces/**']
push:
branches: [master]
paths: ['cea/**', 'pyproject.toml', 'pixi.lock', '!cea/interfaces/**']
concurrency:
# Use head_ref for PRs, fall back to ref for pushes
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
# Only cancel in-progress jobs for PRs, not for pushes to master
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# wntr does not support linux ARM (no EPANET ARM binaries)
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
steps:
- uses: actions/checkout@v4
- name: Setup pixi
uses: prefix-dev/[email protected]
with:
cache: true
- name: Install CEA
run: pixi run pip install .
- name: Run unit tests
run: pixi run cea test --type unittest
- name: Run integration tests
if: github.event.pull_request.draft == false
run: pixi run cea test --type integration