Fix auth tokens expiring for long running commands (#18) #76
This file contains hidden or 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: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
run-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v1 | |
- name: test module | |
id: test_module | |
uses: cmbrose/pester-tests-report@v1 | |
with: | |
include_paths: tests | |
report_name: cosmos-db tests | |
report_title: cosmos-db tests | |
gist_name: pester-tests-report.md | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
gist_token: ${{ secrets.GIST_TOKEN }} | |
gist_badge_label: Tests %ExecutedAt% | |
- name: dump results | |
shell: pwsh | |
run: | | |
ipmo GitHubActions | |
$test_results_path = '${{ steps.test_module.outputs.test_results_path }}' | |
$error_message = '${{ steps.test_module.outputs.error_message }}' | |
$error_clixml_path = '${{ steps.test_module.outputs.error_clixml_path }}' | |
$result_clixml_path = '${{ steps.test_module.outputs.result_clixml_path }}' | |
$result_value = '${{ steps.test_module.outputs.result_value }}' | |
$total_count = '${{ steps.test_module.outputs.total_count }}' | |
$passed_count = '${{ steps.test_module.outputs.passed_count }}' | |
$failed_count = '${{ steps.test_module.outputs.failed_count }}' | |
Write-ActionInfo "Found these outputs from [test_module]:" | |
Write-ActionInfo " * test_results_path = $test_results_path" | |
Write-ActionInfo " * error_message = $error_message" | |
Write-ActionInfo " * error_clixml_path = $error_clixml_path" | |
Write-ActionInfo " * result_clixml_path = $result_clixml_path" | |
Write-ActionInfo " * result_value = $result_value" | |
Write-ActionInfo " * total_count = $total_count" | |
Write-ActionInfo " * passed_count = $passed_count" | |
Write-ActionInfo " * failed_count = $failed_count" | |
if ($error_clixml_path) { | |
$er = Import-Clixml -Path $error_clixml_path | |
Write-ActionInfo "Loaded up the ErrorRecord:" | |
$er | |
$er.Exception | |
} | |
if ($result_clixml_path) { | |
$pr = Import-Clixml -Path $result_clixml_path | |
Write-ActionInfo "Loaded up the Pester Result:" | |
$pr | |
} | |
exit $failed_count |