Update finetuna.Tests.ps1 #68
Workflow file for this run
This file contains 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: Run Tests | |
on: | |
push: | |
jobs: | |
run-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Cache PowerShell modules | |
id: cache-psmodules | |
uses: potatoqualitee/[email protected] | |
with: | |
modules-to-cache: PSOpenAI | |
- name: Run tests | |
shell: pwsh | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
run: | | |
Import-Module ./finetuna.psd1 -ErrorAction Stop | |
$testResult = Invoke-Pester -Path "./tests/finetuna.Tests.ps1" -PassThru | |
if ($testResult.FailedCount -gt 0) { | |
throw "$($testResult.FailedCount) tests failed." | |
} |