-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace AppVeyor with Github Actions (#10439)
- Loading branch information
1 parent
0d46335
commit 536be13
Showing
2 changed files
with
54 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: "Windows unit tests" | ||
|
||
on: [push] | ||
|
||
jobs: | ||
test: | ||
runs-on: windows-2019 # https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md | ||
steps: | ||
- name: Set git to use LF # needed so gofmt doesn't think every file needs reformatting | ||
run: | | ||
git config --global core.autocrlf false | ||
git config --global core.eol lf | ||
- name: Checkout datadog-agent repository | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 #needed for 'git describe' to work | ||
|
||
- name: Install python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.8.10' | ||
|
||
- name: Install go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '1.16.7' | ||
|
||
- name: Set up runner | ||
run: | | ||
$ErrorActionPreference = 'Stop'; | ||
# install dependencies | ||
python -m pip install codecov -r requirements.txt | ||
If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" } | ||
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 | ||
run: | | ||
export PATH="/c/msys64/mingw64/bin:/c/msys64/usr/bin/:$PATH" # prepend msys, otherwise make from mingw gets used | ||
echo $PATH | ||
inv -e rtloader.make | ||
inv -e rtloader.format --raise-if-changed | ||
inv -e rtloader.install | ||
# FIXME: skipping rtloader tests because they fail | ||
# inv -e rtloader.test | ||
inv -e test --rerun-fails=2 --python-runtimes 3 --coverage --profile --fail-on-fmt --python-home-3=$pythonLocation | ||
codecov -f profile.cov -F windows |
This file was deleted.
Oops, something went wrong.