forked from aws/aws-sam-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor-windows.yml
156 lines (131 loc) · 5.08 KB
/
appveyor-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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
version: 1.0.{build}
image: Visual Studio 2019
build: off
clone_folder: C:\source
configuration:
- BuildIntegTesting
- DeployIntegTesting
- LocalIntegTesting
# other Integration testing, Dev, regression and smoke testing
- OtherTesting
environment:
AWS_DEFAULT_REGION: us-east-1
SAM_CLI_DEV: 1
# Python uses $TMPDIR envvar to find root of tempdir
TMPDIR: '%TEMP%'
TMP: '%TEMP%'
# MSI Installers only use Py3.7.6. It is sufficient to test with this version here.
PYTHON_HOME: "C:\\Python37-x64"
PYTHON_SCRIPTS: "C:\\Python37-x64\\Scripts"
PYTHON_EXE: "C:\\Python37-x64\\python.exe"
PYTHON_ARCH: "64"
HOME: 'C:\Users\appveyor'
HOMEDRIVE: "C:"
HOMEPATH: 'C:\Users\appveyor'
NOSE_PARAMETERIZED_NO_WARN: 1
AWS_S3: "AWS_S3_37_WIN"
AWS_ECR: "AWS_ECR_37"
APPVEYOR_CONSOLE_DISABLE_PTY: true
init:
# Uncomment this for RDP
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
- ps: gcim Win32_Processor | % { "$($_.NumberOfLogicalProcessors) logical CPUs" }
- ps: gcim Win32_OperatingSystem | % { "$([int]($_.TotalVisibleMemorySize/1mb)) Gb" }
- git config --global core.autocrlf false
- ps: New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
- ps: git config --system core.longpaths true
cache:
- C:\ProgramData\chocolatey\bin -> appveyor.yml
- C:\ProgramData\chocolatey\lib -> appveyor.yml
install:
# setup make
- "choco install make"
# Make sure the temp directory exists for Python to use.
- ps: "mkdir -Force C:\\tmp"
- "SET PATH=%PYTHON_HOME%;C:\\Ruby27-x64\\bin;%PATH%"
- "echo %PYTHON_HOME%"
- "echo %PATH%"
- "python --version"
- "docker info"
# Upgrade setuptools, wheel and virtualenv
- "python -m pip install --upgrade setuptools wheel virtualenv"
# Install AWS CLI Globally via pip3
- "pip install awscli"
# Create new virtual environment with chosen python version and activate it
- "python -m virtualenv venv"
- "venv\\Scripts\\activate"
- "python --version"
# Actually install SAM CLI's dependencies
- 'pip install -e ".[dev]"'
# Install aws cli
- "pip install awscli"
# Switch to Docker Linux containers
- ps: Switch-DockerLinux
# Check for git executable
- "git --version"
# Echo final Path
- "echo %PATH%"
for:
#Integ testing build, regression
- matrix:
only:
- configuration: BuildIntegTesting
test_script:
# Reactivate virtualenv before running tests
- ps: "
If (Test-Path env:BY_CANARY){
echo Logging in Public ECR; aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws;
}"
- "git --version"
- "venv\\Scripts\\activate"
- "docker system prune -a -f"
- ps: "pytest -vv tests/integration/buildcmd"
#Integ testing deploy
- matrix:
only:
- configuration: DeployIntegTesting
test_script:
# Reactivate virtualenv before running tests
- ps: "
If (Test-Path env:BY_CANARY){
echo Logging in Public ECR; aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws;
}"
- "git --version"
- "venv\\Scripts\\activate"
- "docker system prune -a -f"
- ps: "pytest -vv tests/integration/delete tests/integration/deploy tests/integration/package tests/integration/sync"
#Integ testing local
- matrix:
only:
- configuration: LocalIntegTesting
test_script:
# Reactivate virtualenv before running tests
- ps: "
If (Test-Path env:BY_CANARY){
echo Logging in Public ECR; aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws;
}"
- "git --version"
- "venv\\Scripts\\activate"
- "docker system prune -a -f"
- ps: "pytest -vv tests/integration/local"
#Other testing
- matrix:
only:
- configuration: OtherTesting
test_script:
# Reactivate virtualenv before running tests
- ps: "
If (Test-Path env:BY_CANARY){
echo Logging in Public ECR; aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws;
}"
- "git --version"
- "venv\\Scripts\\activate"
- "docker system prune -a -f"
- ps: "pytest --cov samcli --cov-report term-missing --cov-fail-under 94 tests/unit"
- "mypy setup.py samcli tests"
- ps: "pytest -n 4 tests/functional"
- ps: "pytest -vv tests/integration --ignore=tests/integration/buildcmd --ignore=tests/integration/delete --ignore=tests/integration/deploy --ignore=tests/integration/package --ignore=tests/integration/sync --ignore=tests/integration/local"
- ps: "pytest -vv tests/regression"
# Uncomment for RDP
# on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))