mirror of
https://github.com/actions/setup-dotnet.git
synced 2024-11-23 03:51:07 +07:00
Fix e2e test
This commit is contained in:
parent
ee5b7d1546
commit
3dfc29b429
10
.github/workflows/windos-fix.yml
vendored
10
.github/workflows/windos-fix.yml
vendored
@ -17,7 +17,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
operating-system: [windows-2019, windows-2020]
|
operating-system: [windows-2019, windows-2022]
|
||||||
dotnet-version: ['2.1', '2.2', '3.0', '3.1', '5.0', '6.0', '7.0', '8.0']
|
dotnet-version: ['2.1', '2.2', '3.0', '3.1', '5.0', '6.0', '7.0', '8.0']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@ -37,10 +37,12 @@ jobs:
|
|||||||
|
|
||||||
- name: Verify the action took less than 1 minute
|
- name: Verify the action took less than 1 minute
|
||||||
run: |
|
run: |
|
||||||
$timestamp = Get-Content -Path "timestamp.txt"
|
$timestampContent = Get-Content -Path "timestamp.txt"
|
||||||
|
$timestamp = [DateTime]::Parse($timestampContent)
|
||||||
$now = Get-Date
|
$now = Get-Date
|
||||||
$diff = $now - $timestamp
|
|
||||||
if ($diff.TotalMinutes -gt 1) {
|
$diff = New-TimeSpan -Start $timestamp -End $now
|
||||||
|
if ($diff.Minutes -gt 1) {
|
||||||
throw "The action took longer than 1 minute to run"
|
throw "The action took longer than 1 minute to run"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user