diff --git a/.github/workflows/jan-electron-linter-and-test.yml b/.github/workflows/jan-electron-linter-and-test.yml index 55c3308da..05d320bbd 100644 --- a/.github/workflows/jan-electron-linter-and-test.yml +++ b/.github/workflows/jan-electron-linter-and-test.yml @@ -67,6 +67,7 @@ jobs: CSC_IDENTITY_AUTO_DISCOVERY: "false" test-on-windows: + if: github.event_name == 'push' strategy: fail-fast: false matrix: @@ -101,6 +102,38 @@ jobs: shell: powershell run: | make test + test-on-windows-pr: + if: github.event_name == 'pull_request' + runs-on: windows-desktop-default-windows-security + steps: + - name: Clean workspace + run: | + Remove-Item -Path "\\?\$(Get-Location)\*" -Force -Recurse + $path = "$Env:APPDATA\jan" + if (Test-Path $path) { + Remove-Item "\\?\$path" -Recurse -Force + } else { + Write-Output "Folder does not exist." + } + - name: Getting the repo + uses: actions/checkout@v3 + + - name: Installing node + uses: actions/setup-node@v1 + with: + node-version: 20 + + # Clean cache, continue on error + - name: "Cleanup cache" + shell: powershell + continue-on-error: true + run: | + make clean + + - name: Linter and test + shell: powershell + run: | + make test test-on-ubuntu: runs-on: [self-hosted, Linux, ubuntu-desktop]