Skip to content

Commit

Permalink
Replace AppVeyor with Github Actions (#10439)
Browse files Browse the repository at this point in the history
  • Loading branch information
albertvaka authored Jan 6, 2022
1 parent 0d46335 commit 536be13
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 54 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/windows-unittests.yml
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
54 changes: 0 additions & 54 deletions appveyor.yml

This file was deleted.

0 comments on commit 536be13

Please sign in to comment.