Skip to content

sontric/inverter-lab

Repository files navigation

inverter-lab

CI Tests

Purpose

This is a demo repo, intended to highlight the following:

  • CI Testing and main branch protection with GitHub Actions
  • PyTest and Allure Automated Report Generation (reports uploaded as CI artifacts)
  • Typhoon HIL Model Compliation, execution, and interactions

Dev Environment Setup (Windows)

  • Git
    git config --global user.name "Your Name"
    git config --global user.email "your_email@example.com"  
    
  • GitHub CLI (recommended)
    gh auth login
    
  • VSCode (recommended)
  • Python 3.11.9
  • Scoop via PowerShell
    Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
    Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
    
  • pipx via Scoop
    scoop install pipx
    pipx ensurepath
    
  • Poetry via pipx
    pipx install poetry
    
    If poetry not found
    $pipxBin = "C:\Users\david\.local\bin"  # <-- use the value from PIPX_BIN_DIR
    $userPath = [Environment]::GetEnvironmentVariable("PATH", "User")
    if ($userPath -notlike "*$pipxBin*") {
        [Environment]::SetEnvironmentVariable("PATH", "$userPath;$pipxBin", "User")
    }
    # Also patch the current session so it works immediately:
    $env:PATH += ";$pipxBin"
    
  • Allure via Scoop (html report generation)
    scoop install allure
    
  • Java (Allure Dependency)
  • Quarto (Markdown Rendering)
  • Tectonic (PDF Engine)
    scoop bucket add extras
    scoop install tectonic
    

Test Execution and Report Generation

Once the dependencies have been installed, the full test sequence may be executed by running the following script. This script includes the initialization of the poetry env and the report generation.

./test.ps1

About

SIL and HIL source code for inverter testing and validation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published