Skip to content

[ASCII-1513] Add json flag to diagnose command #26191

[ASCII-1513] Add json flag to diagnose command

[ASCII-1513] Add json flag to diagnose command #26191

Workflow file for this run

name: "Windows linters"
on:
push:
branches:
- main
- "[0-9]+.[0-9]+.x"
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
windows-lint:
runs-on: windows-2019 # https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md
steps:
- name: Checkout datadog-agent repository
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
fetch-depth: 0 #needed for 'git describe' to work
- name: Install python
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: 3.11
cache: "pip"
- run: |
python -m pip install -r requirements.txt
If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" }
- name: Install go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: ".go-version"
- name: Install Dotnet
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0
with:
dotnet-version: '7.0.x'
- name: Set up runner
run: |
$ErrorActionPreference = 'Stop';
# install dependencies
inv -e install-tools
If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" }
inv -e deps
If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" }
# Run this first as it's quite quick compared to Go
- name: Run Dotnet linter
shell: bash # using bash so we don't have to check $lastExitCode all the time
run: |
dotnet format --verify-no-changes .\\tools\\windows\\DatadogAgentInstaller
- name: Run Go linters
shell: bash # using bash so we don't have to check $lastExitCode all the time
run: |
export PATH="/c/msys64/mingw64/bin:/c/msys64/usr/bin/:$PATH" # prepend msys, otherwise make from mingw gets used
echo $PATH
powershell.exe -Command ./tasks/winbuildscripts/pre-go-build.ps1
inv -e linter.go --timeout 30