Skip to content

[agent-ci] add Defender exclusion and diagnostics to troubleshoot CI … #33

[agent-ci] add Defender exclusion and diagnostics to troubleshoot CI …

[agent-ci] add Defender exclusion and diagnostics to troubleshoot CI … #33

Workflow file for this run

name: CI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
env:
CARGO_TERM_COLOR: always
jobs:
check:
name: Check
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Disable Windows Defender real-time protection
shell: powershell
run: |
Set-MpPreference -DisableRealtimeMonitoring $true
Write-Host "Defender real-time monitoring disabled"
- name: Diagnostics
shell: powershell
run: |
rustc --version
cargo --version
Write-Host "LOCALAPPDATA: $env:LOCALAPPDATA"
Write-Host "USERPROFILE: $env:USERPROFILE"
Write-Host "TEMP: $env:TEMP"
- run: cargo check --all-targets
test:
name: Test
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Disable Windows Defender real-time protection
shell: powershell
run: |
Set-MpPreference -DisableRealtimeMonitoring $true
Write-Host "Defender real-time monitoring disabled"
- name: Diagnostics
shell: powershell
run: |
rustc --version
cargo --version
Write-Host "LOCALAPPDATA: $env:LOCALAPPDATA"
Write-Host "USERPROFILE: $env:USERPROFILE"
Write-Host "TEMP: $env:TEMP"
- run: cargo test --lib -- --test-threads=1 --nocapture
fmt:
name: Rustfmt
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Disable Windows Defender real-time protection
shell: powershell
run: |
Set-MpPreference -DisableRealtimeMonitoring $true
Write-Host "Defender real-time monitoring disabled"
- run: cargo fmt --check
clippy:
name: Clippy
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Disable Windows Defender real-time protection
shell: powershell
run: |
Set-MpPreference -DisableRealtimeMonitoring $true
Write-Host "Defender real-time monitoring disabled"
- name: Diagnostics
shell: powershell
run: |
rustc --version
cargo --version
cargo clippy --version
- run: cargo clippy --all-targets -- -W warnings