Skip to content

Adjust PV forecasts #1161

Adjust PV forecasts

Adjust PV forecasts #1161

Workflow file for this run

name: Python test
on:
push:
branches: [master]
pull_request:
branches: [master]
permissions:
security-events: write
contents: read
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
env:
OS: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: ".python-version"
- name: Set up Python venv
run: |
uv venv
shell: bash
- name: Special dependencies for macos
if: matrix.os == 'macos-latest'
run: |
source .venv/bin/activate
brew install hdf5
brew install glpk
brew install cbc
uv pip install numpy==2.0.0
uv pip install tables==3.10.2
uv pip install pulp==3.0.2
uv run pulptest
- name: Install EMHASS with test dependencies (Linux/macOS)
if: matrix.os != 'windows-latest'
run: |
source .venv/bin/activate
uv sync --reinstall --extra test
shell: bash
- name: Install EMHASS with test dependencies (Windows)
if: matrix.os == 'windows-latest'
run: |
.venv\Scripts\activate
uv sync --reinstall --extra test
shell: cmd
- name: Test with pytest (Linux/macOS)
if: matrix.os != 'windows-latest'
run: |
source .venv/bin/activate
uv run pytest
shell: bash
- name: Test with pytest (Windows)
if: matrix.os == 'windows-latest'
run: |
.venv\Scripts\activate
uv run pytest
shell: cmd
scan-pr:
needs:
- build
uses: "geoderp/osv-scanner-action/.github/workflows/[email protected]"
with:
fail-on-vuln: false
scan-args: |-
--recursive
./
permissions:
security-events: write
contents: read
actions: read