From e902d8edfff2e2ce9312a057212836213fbda8d4 Mon Sep 17 00:00:00 2001 From: hiento09 <136591877+hiento09@users.noreply.github.com> Date: Fri, 22 Mar 2024 11:53:15 +0700 Subject: [PATCH] PR disable antivirus check (#2454) Co-authored-by: Hien To --- .../jan-electron-linter-and-test.yml | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/.github/workflows/jan-electron-linter-and-test.yml b/.github/workflows/jan-electron-linter-and-test.yml index 55c3308da6..05d320bbd5 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]