Add metrics for DiscoverPollEndpoint and ACSSession #7605
Workflow file for this run
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
name: Windows | |
on: [pull_request] | |
permissions: read-all | |
jobs: | |
windows-unit-tests: | |
name: Windows unit tests | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
path: src/github.com/aws/amazon-ecs-agent | |
- name: get GO_VERSION | |
id: get-go-version | |
run: | | |
cd "$Env:GITHUB_WORKSPACE" | |
cd "src/github.com/aws/amazon-ecs-agent" | |
$ErrorActionPreference = "Stop" | |
$go_version_win = $(type GO_VERSION_WINDOWS) | |
$go_version_re = "^\d+\.{1,2}\d+$" | |
if (-Not ($go_version_win.Length -le 10 -or $go_version_win -match $go_version_re) ) { | |
echo "invalid GO version" | |
exit 1 | |
} | |
Write-Output "GO_VERSION_WINDOWS=$go_version_win" >> $GITHUB_OUTPUT | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ steps.get-go-version.outputs.GO_VERSION_WINDOWS }} | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
path: src/github.com/aws/amazon-ecs-agent | |
- name: run agent tests | |
working-directory: | |
run: | | |
$Env:GOPATH = "$Env:GITHUB_WORKSPACE" | |
cd "$Env:GITHUB_WORKSPACE" | |
cd "src/github.com/aws/amazon-ecs-agent/agent" | |
gcc --version | |
$env:ZZZ_SKIP_WINDOWS_SERVER_VERSION_CHECK_NOT_SUPPORTED_IN_PRODUCTION = 'true' | |
$packages=go list .\... | Where-Object {$_ -NotMatch 'vendor'} | |
go test -v -tags unit -timeout=120s $packages | |
- name: run ecs-agent tests | |
working-directory: | |
run: | | |
$Env:GOPATH = "$Env:GITHUB_WORKSPACE" | |
cd "$Env:GITHUB_WORKSPACE" | |
cd "src/github.com/aws/amazon-ecs-agent/ecs-agent" | |
gcc --version | |
$packages=go list .\... | Where-Object {$_ -NotMatch 'vendor'} | |
go test -v -tags unit -timeout=120s $packages |