diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 48fa636..696bfc2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/.github/workflows/merge-coverage.yml b/.github/workflows/merge-coverage.yml index 1495b46..627091d 100644 --- a/.github/workflows/merge-coverage.yml +++ b/.github/workflows/merge-coverage.yml @@ -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 diff --git a/main_test.go b/main_test.go index 96b4a90..9b91851 100644 --- a/main_test.go +++ b/main_test.go @@ -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 {