mirror of
https://github.com/Lifailon/lazyjournal.git
synced 2026-11-11 01:09:46 +01:00
debug tests for win files in ci
This commit is contained in:
@@ -106,13 +106,16 @@ jobs:
|
||||
run: sudo go test -v -cover
|
||||
continue-on-error: true
|
||||
|
||||
- name: Create log files for Windows
|
||||
- name: Create markdown report in Linux
|
||||
if: ${{ github.event.inputs.testFunctions == 'true' && github.event.inputs.Distro != 'windows-2022' }}
|
||||
run: cat test-report.md >> $GITHUB_STEP_SUMMARY
|
||||
continue-on-error: true
|
||||
|
||||
- name: Create log file for Windows
|
||||
if: ${{ github.event.inputs.testFunctions == 'true' && github.event.inputs.Distro == 'windows-2022' }}
|
||||
run: |
|
||||
New-Item -Path "$env:APPDATA\test" -Type Directory
|
||||
"line test" | Out-File -FilePath "$env:APPDATA\test\test.log"
|
||||
New-Item -Path "$env:LOCALAPPDATA\test" -Type Directory
|
||||
"line test" | Out-File -FilePath "$env:LOCALAPPDATA\test\test.log"
|
||||
shell: pwsh
|
||||
continue-on-error: true
|
||||
|
||||
@@ -121,9 +124,11 @@ jobs:
|
||||
run: go test -v --run TestWin* -cover
|
||||
continue-on-error: true
|
||||
|
||||
- name: Create markdown report
|
||||
if: ${{ github.event.inputs.testFunctions == 'true' }}
|
||||
run: cat test-report.md >> $GITHUB_STEP_SUMMARY
|
||||
- name: Create markdown report in Windows
|
||||
if: ${{ github.event.inputs.testFunctions == 'true' && github.event.inputs.Distro == 'windows-2022' }}
|
||||
run: |
|
||||
Get-Content test-report.md | Out-File -Append -FilePath $env:GITHUB_STEP_SUMMARY
|
||||
shell: pwsh
|
||||
continue-on-error: true
|
||||
|
||||
- name: Update coverage report
|
||||
|
||||
@@ -71,13 +71,11 @@ jobs:
|
||||
go mod verify
|
||||
go build -v ./...
|
||||
|
||||
- name: Create log files for Windows
|
||||
- name: Create log file for Windows
|
||||
if: ${{ github.event.inputs.testFunctions == 'true' && github.event.inputs.Distro == 'windows-2022' }}
|
||||
run: |
|
||||
New-Item -Path "$env:APPDATA\test" -Type Directory
|
||||
"line test" | Out-File -FilePath "$env:APPDATA\test\test.log"
|
||||
New-Item -Path "$env:LOCALAPPDATA\test" -Type Directory
|
||||
"line test" | Out-File -FilePath "$env:LOCALAPPDATA\test\test.log"
|
||||
shell: pwsh
|
||||
continue-on-error: true
|
||||
|
||||
@@ -86,7 +84,10 @@ jobs:
|
||||
continue-on-error: true
|
||||
|
||||
- name: Create markdown report
|
||||
run: cat test-report.md >> $GITHUB_STEP_SUMMARY
|
||||
if: ${{ github.event.inputs.testFunctions == 'true' && github.event.inputs.Distro == 'windows-2022' }}
|
||||
run: |
|
||||
Get-Content test-report.md | Out-File -Append -FilePath $env:GITHUB_STEP_SUMMARY
|
||||
shell: pwsh
|
||||
continue-on-error: true
|
||||
|
||||
- name: Upload coverage report for Windows
|
||||
|
||||
+2
-2
@@ -42,8 +42,8 @@ func TestWinFiles(t *testing.T) {
|
||||
// {"Program Files", "ProgramFiles"},
|
||||
// {"Program Files 86", "ProgramFiles86"},
|
||||
// {"ProgramData", "ProgramData"},
|
||||
{"AppData/Local", "AppDataLocal"},
|
||||
{"AppData/Roaming", "AppDataRoaming"},
|
||||
// {"AppData/Local", "AppDataLocal"},
|
||||
{"AppData/Roaming", "AppDataRoaming"}, // Works in CI Actions
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
|
||||
Reference in New Issue
Block a user