Skip to content

Remove unnecessary argument in CommonConfigure calls (#25651) #68801

Remove unnecessary argument in CommonConfigure calls (#25651)

Remove unnecessary argument in CommonConfigure calls (#25651) #68801

name: "Windows unit tests"
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-unit-tests:
runs-on: windows-2022 # 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: 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" }
# create 'ddagentuser' user to test the secrets feature on windows
$Password = ConvertTo-SecureString "dummyPW_:-gch6Rejae9" -AsPlainText -Force
New-LocalUser -Name "ddagentuser" -Description "Test user for the secrets feature on windows." -Password $Password
- name: Run tests
shell: bash # using bash so we don't have to check $lastExitCode all the time
env:
GO_TEST_SKIP_FLAKE: "true"
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
# FIXME: skipping rtloader tests because they fail with a DLL-not-found error
# inv -e rtloader.test
inv -e test --rerun-fails=2 --python-runtimes 3 --coverage --profile --python-home-3=$pythonLocation --timeout=600 --build-stdlib --test-washer
- name: Upload Codecov results
uses: codecov/codecov-action@ab904c41d6ece82784817410c45d8b8c02684457 # v3.1.6
with:
flags: windows
name: codecov-windows