@@ -58,12 +58,17 @@ jobs:
5858 - " 3.9"
5959 - " 3.11"
6060 steps :
61+ # This allows temp file creation on drive D, which won't trigger windows defender scan and leads to faster IO
62+ - name : Set TEMP to D:/Temp
63+ run : |
64+ mkdir "D:\\Temp"
65+ echo "TEMP=D:\\Temp" >> $env:GITHUB_ENV
66+ if : ${{ matrix.os == 'windows-latest' }}
6167 - uses : actions/checkout@v5
6268 - uses : actions/setup-python@v6
6369 with :
6470 python-version : ${{ matrix.python }}
6571 - run : test -f "./.github/ISSUE_TEMPLATE/Bug_report.md" # prevent Bug_report.md from being renamed or deleted
66- - run : make init
6772 - run : make pr
6873
6974 validate-schema :
9095 shell: bash
9196
9297 integration-tests :
93- name : Integ / ${{ matrix.os }} / ${{ matrix.python }} / ${{ matrix.tests_config }}
98+ name : Integ / ${{ matrix.os }} / ${{ matrix.python }} / ${{ matrix.tests_config.name }}
9499 if : github.repository_owner == 'aws'
95100 runs-on : ${{ matrix.os }}
96101 env :
@@ -114,25 +119,32 @@ jobs:
114119 - " 3.11"
115120 # folders that is commented below requires credentials, no need to spare time to run them
116121 tests_config :
117- - " -n 2 --reruns 3 tests/integration/buildcmd"
122+ - name : " integ-buildcmd-arm64"
123+ params : " -n 2 --reruns 3 tests/integration/buildcmd/test_build_cmd_arm64.py"
124+ - name : " integ-buildcmd-main"
125+ params : " -n 2 --reruns 3 tests/integration/buildcmd/test_build_cmd_dotnet.py tests/integration/buildcmd/test_build_cmd_provided.py tests/integration/buildcmd/test_build_cmd_rust.py tests/integration/buildcmd/test_build_cmd_python.py tests/integration/buildcmd/test_build_cmd_node.py"
126+ - name : " integ-buildcmd-java"
127+ params : " -n 2 --reruns 5 tests/integration/buildcmd/test_build_cmd_java.py"
128+ - name : " integ-buildcmd-other"
129+ params : " -n 2 --reruns 3 tests/integration/buildcmd --ignore=tests/integration/buildcmd/test_build_cmd_arm64.py --ignore=tests/integration/buildcmd/test_build_cmd_dotnet.py --ignore=tests/integration/buildcmd/test_build_cmd_provided.py --ignore=tests/integration/buildcmd/test_build_cmd_rust.py --ignore=tests/integration/buildcmd/test_build_cmd_python.py --ignore=tests/integration/buildcmd/test_build_cmd_node.py --ignore=tests/integration/buildcmd/test_build_cmd_java.py"
118130 # - "delete"
119131 # - "deploy"
120- - " tests/integration/init"
132+ - name : " integ-all-other"
133+ params : " -n 2 --reruns 3 tests/integration/init tests/integration/local tests/integration/pipeline tests/integration/root tests/integration/scripts tests/integration/telemetry tests/integration/docs"
121134 # - "list"
122- - " tests/integration/local"
123135 # - "logs"
124136 # - "package"
125- - " tests/integration/pipeline"
126137 # - "publish"
127- - " tests/integration/root"
128- - " tests/integration/scripts"
129138 # - "sync"
130- - " tests/integration/telemetry"
131139 # - "traces"
132140 # - "validate"
133- - " tests/integration/docs"
134141 steps :
135142 - uses : actions/checkout@v5
143+ - name : Set TEMP to D:/Temp
144+ run : |
145+ mkdir "D:\\Temp"
146+ echo "TEMP=D:\\Temp" >> $env:GITHUB_ENV
147+ if : ${{ matrix.os == 'windows-latest' }}
136148 - uses : actions/setup-python@v6
137149 with :
138150 # set last version as the one in matrix to make it default
@@ -143,6 +155,7 @@ jobs:
143155 3.12
144156 3.13
145157 ${{ matrix.python }}
158+ cache : ' pip'
146159 - uses : actions/setup-go@v6
147160 with :
148161 go-version : ' 1.19'
@@ -173,29 +186,17 @@ jobs:
173186 rustup default stable
174187 pip install cargo-lambda==$CARGO_LAMBDA_VERSION
175188 echo "$HOME/.local/bin" >> $GITHUB_PATH
176-
177- - name : Upgrade pip in Python3.12 (Linux)
178- run : |
179- python3.12 -m pip install pip --upgrade
180- python3.12 -m pip install setuptools --upgrade
181- if : ${{ matrix.os == 'ubuntu-latest' }}
182-
183- - name : Upgrade pip in Python3.12 (Windows)
184- run : |
185- py -3.12 -m pip install pip --upgrade
186- py -3.12 -m pip install setuptools --upgrade
187- if : ${{ matrix.os == 'windows-latest' }}
188-
189-
190189 - name : Init samdev
191190 run : make init
192- - name : Run integration tests for ${{ matrix.tests_config }}
193- run : pytest -vv ${{ matrix.tests_config }}
191+ - name : uv install setuptools in Python3.12
192+ run : uv pip install --system --python python3.12 --upgrade pip setuptools
193+ - name : Run integration tests for ${{ matrix.tests_config.name }}
194+ run : pytest -vv ${{ matrix.tests_config.params }}
194195
195196 smoke-and-functional-tests :
196- name : Functional & Smoke Tests / ${{ matrix.os }} / ${{ matrix.python }}
197+ name : ${{ matrix.tests_config.name }} / ${{ matrix.tests_config .os }} / ${{ matrix.python }}
197198 if : github.repository_owner == 'aws'
198- runs-on : ${{ matrix.os }}
199+ runs-on : ${{ matrix.tests_config. os }}
199200 env :
200201 AWS_DEFAULT_REGION : us-east-1
201202 SAM_CLI_DEV : " 1"
@@ -206,21 +207,43 @@ jobs:
206207 strategy :
207208 fail-fast : false
208209 matrix :
209- os :
210- - ubuntu-latest
211- - windows-latest
212210 python :
213211 - " 3.9"
214212 - " 3.11"
213+ tests_config :
214+ - name : " Smoke & Functional Tests - All"
215+ os : ubuntu-latest
216+ params : " -n 4 tests/smoke tests/functional"
217+ env_vars : " all"
218+ - name : " Smoke Tests - First Third"
219+ os : windows-latest
220+ params : " -n 4 tests/smoke"
221+ env_vars : " first-third"
222+ - name : " Smoke Tests - Second Third"
223+ os : windows-latest
224+ params : " -n 4 tests/smoke"
225+ env_vars : " second-third"
226+ - name : " Smoke Tests - Third Third & Functional Tests"
227+ os : windows-latest
228+ params : " -n 4 tests/smoke tests/functional"
229+ env_vars : " third-third"
215230 steps :
216231 - uses : actions/checkout@v5
232+ - name : Set TEMP to D:/Temp
233+ run : |
234+ mkdir "D:\\Temp"
235+ echo "TEMP=D:\\Temp" >> $env:GITHUB_ENV
236+ if : ${{ matrix.os == 'windows-latest' }}
217237 - uses : actions/setup-python@v6
218238 with :
219239 python-version : ${{ matrix.python }}
240+ cache : ' pip'
220241 - name : Init samdev
221242 run : make init
222- - name : Run functional & smoke tests
223- run : pytest -vv -n 4 tests/functional tests/smoke
243+ - name : Run ${{ matrix.tests_config.name }}
244+ run : pytest -vv ${{ matrix.tests_config.params }}
245+ env :
246+ SMOKE_TEST_SUBSET : ${{ matrix.tests_config.env_vars }}
224247
225248 docker-disabled :
226249 name : Docker-disabled Tests / ${{ matrix.os }}
@@ -236,6 +259,11 @@ jobs:
236259 - windows-latest
237260 steps :
238261 - uses : actions/checkout@v5
262+ - name : Set TEMP to D:/Temp
263+ run : |
264+ mkdir "D:\\Temp"
265+ echo "TEMP=D:\\Temp" >> $env:GITHUB_ENV
266+ if : ${{ matrix.os == 'windows-latest' }}
239267 - uses : actions/setup-python@v6
240268 with :
241269 # These are the versions of Python that correspond to the supported Lambda runtimes
@@ -255,24 +283,16 @@ jobs:
255283 if : ${{ matrix.os == 'windows-latest' }}
256284 shell : pwsh
257285 run : stop-service docker
258- - name : Upgrade pip in Python3.12 (Linux)
259- run : |
260- python3.12 -m pip install pip --upgrade
261- python3.12 -m pip install setuptools --upgrade
262- if : ${{ matrix.os == 'ubuntu-latest' }}
263- - name : Upgrade pip in Python3.12 (Windows)
264- run : |
265- py -3.12 -m pip install pip --upgrade
266- py -3.12 -m pip install setuptools --upgrade
267- if : ${{ matrix.os == 'windows-latest' }}
286+ - name : Init samdev
287+ run : make init
288+ - name : uv install setuptools in Python3.12
289+ run : uv pip install --system --python python3.12 --upgrade pip setuptools
268290 - name : Check Docker not Running
269291 run : docker info
270292 id : run-docker-info
271293 continue-on-error : true
272294 - name : Report failure
273295 if : steps.run-docker-info.outcome == 'success'
274296 run : exit 1
275- - name : Init samdev
276- run : make init
277297 - name : Run tests without Docker
278298 run : pytest -vv tests/integration/buildcmd/test_build_cmd_python.py -k TestBuildCommand_PythonFunctions_WithoutDocker
0 commit comments