-
Notifications
You must be signed in to change notification settings - Fork 618
52 lines (50 loc) · 1.84 KB
/
windows.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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