Skip to content

Commit 8f31840

Browse files
committed
adjust test setup
1 parent b1f729e commit 8f31840

File tree

1 file changed

+139
-134
lines changed

1 file changed

+139
-134
lines changed

.github/workflows/build_test.yml

Lines changed: 139 additions & 134 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ jobs:
115115
test:
116116
name: Test ${{ matrix.os.download_name }}-${{ matrix.python-version }}-${{ matrix.cloud-provider }}
117117
needs: build
118+
timeout-minutes: 30
118119
runs-on: ${{ matrix.os.image_name }}
119120
strategy:
120121
fail-fast: false
@@ -168,7 +169,8 @@ jobs:
168169
- name: Install tox
169170
run: python -m pip install tox>=4
170171
- name: Run tests
171-
run: python -m tox run -e `echo py${PYTHON_VERSION/\./}-{extras,unit,integ,pandas,sso}-ci | sed 's/ /,/g'`
172+
# run: python -m tox run -e `echo py${PYTHON_VERSION/\./}-{extras,integ,pandas,sso}-ci | sed 's/ /,/g'`
173+
run: python -m tox run -e `echo py${PYTHON_VERSION/\./}-{extras,integ}-ci | sed 's/ /,/g'`
172174
env:
173175
PYTHON_VERSION: ${{ matrix.python-version }}
174176
cloud_provider: ${{ matrix.cloud-provider }}
@@ -185,6 +187,9 @@ jobs:
185187
.tox/.coverage
186188
.tox/coverage.xml
187189
190+
- name: Print LocalStack logs
191+
run: localstack logs
192+
188193
# test-olddriver:
189194
# name: Old Driver Test ${{ matrix.os.download_name }}-${{ matrix.python-version }}-${{ matrix.cloud-provider }}
190195
# needs: lint
@@ -256,138 +261,138 @@ jobs:
256261
# PYTEST_ADDOPTS: --color=yes --tb=short
257262
# shell: bash
258263

259-
test-fips:
260-
name: Test FIPS linux-3.8-${{ matrix.cloud-provider }}
261-
needs: build
262-
runs-on: ubuntu-latest
263-
strategy:
264-
fail-fast: false
265-
matrix:
266-
cloud-provider: [aws]
267-
steps:
268-
- uses: actions/checkout@v3
269-
- name: Setup parameters file
270-
shell: bash
271-
env:
272-
PARAMETERS_SECRET: ${{ secrets.PARAMETERS_SECRET }}
273-
run: |
274-
gpg --quiet --batch --yes --decrypt --passphrase="$PARAMETERS_SECRET" \
275-
.github/workflows/parameters/public/parameters_${{ matrix.cloud-provider }}.py.gpg > test/parameters.py
276-
- name: Download wheel(s)
277-
uses: actions/download-artifact@v3
278-
with:
279-
name: manylinux_x86_64_py3.8
280-
path: dist
281-
- name: Show wheels downloaded
282-
run: ls -lh dist
283-
shell: bash
284-
- name: Run tests
285-
run: ./ci/test_fips_docker.sh
286-
env:
287-
PYTHON_VERSION: 3.8
288-
cloud_provider: ${{ matrix.cloud-provider }}
289-
PYTEST_ADDOPTS: --color=yes --tb=short
290-
TOX_PARALLEL_NO_SPINNER: 1
291-
shell: bash
292-
- uses: actions/upload-artifact@v3
293-
with:
294-
name: coverage_linux-fips-3.8-${{ matrix.cloud-provider }}
295-
path: |
296-
.coverage
297-
coverage.xml
298-
299-
test-lambda:
300-
name: Test Lambda linux-${{ matrix.python-version }}-${{ matrix.cloud-provider }}
301-
needs: build
302-
runs-on: ubuntu-latest
303-
strategy:
304-
fail-fast: false
305-
matrix:
306-
# python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
307-
python-version: ["3.11"]
308-
cloud-provider: [aws]
309-
steps:
310-
- name: Set shortver
311-
run: echo "shortver=${longver//./}" >> $GITHUB_ENV
312-
env:
313-
longver: ${{ matrix.python-version }}
314-
shell: bash
315-
- uses: actions/checkout@v3
316-
- name: Setup parameters file
317-
shell: bash
318-
env:
319-
PARAMETERS_SECRET: ${{ secrets.PARAMETERS_SECRET }}
320-
run: |
321-
gpg --quiet --batch --yes --decrypt --passphrase="$PARAMETERS_SECRET" \
322-
.github/workflows/parameters/public/parameters_${{ matrix.cloud-provider }}.py.gpg > test/parameters.py
323-
- name: Download wheel(s)
324-
uses: actions/download-artifact@v3
325-
with:
326-
name: manylinux_x86_64_py${{ matrix.python-version }}
327-
path: dist
328-
- name: Show wheels downloaded
329-
run: ls -lh dist
330-
shell: bash
331-
- name: Run tests
332-
run: ./ci/test_lambda_docker.sh ${PYTHON_VERSION}
333-
env:
334-
PYTHON_VERSION: ${{ matrix.python-version }}
335-
cloud_provider: ${{ matrix.cloud-provider }}
336-
PYTEST_ADDOPTS: --color=yes --tb=short
337-
TOX_PARALLEL_NO_SPINNER: 1
338-
shell: bash
339-
- uses: actions/upload-artifact@v3
340-
with:
341-
name: coverage_linux-lambda-${{ matrix.python-version }}-${{ matrix.cloud-provider }}
342-
path: |
343-
.coverage.py${{ env.shortver }}-lambda-ci
344-
junit.py${{ env.shortver }}-lambda-ci-dev.xml
264+
# test-fips:
265+
# name: Test FIPS linux-3.8-${{ matrix.cloud-provider }}
266+
# needs: build
267+
# runs-on: ubuntu-latest
268+
# strategy:
269+
# fail-fast: false
270+
# matrix:
271+
# cloud-provider: [aws]
272+
# steps:
273+
# - uses: actions/checkout@v3
274+
# - name: Setup parameters file
275+
# shell: bash
276+
# env:
277+
# PARAMETERS_SECRET: ${{ secrets.PARAMETERS_SECRET }}
278+
# run: |
279+
# gpg --quiet --batch --yes --decrypt --passphrase="$PARAMETERS_SECRET" \
280+
# .github/workflows/parameters/public/parameters_${{ matrix.cloud-provider }}.py.gpg > test/parameters.py
281+
# - name: Download wheel(s)
282+
# uses: actions/download-artifact@v3
283+
# with:
284+
# name: manylinux_x86_64_py3.8
285+
# path: dist
286+
# - name: Show wheels downloaded
287+
# run: ls -lh dist
288+
# shell: bash
289+
# - name: Run tests
290+
# run: ./ci/test_fips_docker.sh
291+
# env:
292+
# PYTHON_VERSION: 3.8
293+
# cloud_provider: ${{ matrix.cloud-provider }}
294+
# PYTEST_ADDOPTS: --color=yes --tb=short
295+
# TOX_PARALLEL_NO_SPINNER: 1
296+
# shell: bash
297+
# - uses: actions/upload-artifact@v3
298+
# with:
299+
# name: coverage_linux-fips-3.8-${{ matrix.cloud-provider }}
300+
# path: |
301+
# .coverage
302+
# coverage.xml
345303

346-
combine-coverage:
347-
if: ${{ success() || failure() }}
348-
name: Combine coverage
349-
needs: [lint, test, test-fips, test-lambda]
350-
runs-on: ubuntu-latest
351-
steps:
352-
- uses: actions/checkout@v3
353-
- uses: actions/download-artifact@v3
354-
with:
355-
path: artifacts
356-
- name: Set up Python
357-
uses: actions/setup-python@v4
358-
with:
359-
python-version: '3.8'
360-
- name: Display Python version
361-
run: python -c "import sys; print(sys.version)"
362-
- name: Upgrade setuptools and pip
363-
run: python -m pip install -U setuptools pip wheel
364-
- name: Install tox
365-
run: python -m pip install tox>=4
366-
- name: Collect all coverages to one dir
367-
run: |
368-
python -c '
369-
from pathlib import Path
370-
import shutil
304+
# test-lambda:
305+
# name: Test Lambda linux-${{ matrix.python-version }}-${{ matrix.cloud-provider }}
306+
# needs: build
307+
# runs-on: ubuntu-latest
308+
# strategy:
309+
# fail-fast: false
310+
# matrix:
311+
## python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
312+
# python-version: ["3.11"]
313+
# cloud-provider: [aws]
314+
# steps:
315+
# - name: Set shortver
316+
# run: echo "shortver=${longver//./}" >> $GITHUB_ENV
317+
# env:
318+
# longver: ${{ matrix.python-version }}
319+
# shell: bash
320+
# - uses: actions/checkout@v3
321+
# - name: Setup parameters file
322+
# shell: bash
323+
# env:
324+
# PARAMETERS_SECRET: ${{ secrets.PARAMETERS_SECRET }}
325+
# run: |
326+
# gpg --quiet --batch --yes --decrypt --passphrase="$PARAMETERS_SECRET" \
327+
# .github/workflows/parameters/public/parameters_${{ matrix.cloud-provider }}.py.gpg > test/parameters.py
328+
# - name: Download wheel(s)
329+
# uses: actions/download-artifact@v3
330+
# with:
331+
# name: manylinux_x86_64_py${{ matrix.python-version }}
332+
# path: dist
333+
# - name: Show wheels downloaded
334+
# run: ls -lh dist
335+
# shell: bash
336+
# - name: Run tests
337+
# run: ./ci/test_lambda_docker.sh ${PYTHON_VERSION}
338+
# env:
339+
# PYTHON_VERSION: ${{ matrix.python-version }}
340+
# cloud_provider: ${{ matrix.cloud-provider }}
341+
# PYTEST_ADDOPTS: --color=yes --tb=short
342+
# TOX_PARALLEL_NO_SPINNER: 1
343+
# shell: bash
344+
# - uses: actions/upload-artifact@v3
345+
# with:
346+
# name: coverage_linux-lambda-${{ matrix.python-version }}-${{ matrix.cloud-provider }}
347+
# path: |
348+
# .coverage.py${{ env.shortver }}-lambda-ci
349+
# junit.py${{ env.shortver }}-lambda-ci-dev.xml
371350

372-
src_dir = Path("artifacts")
373-
dst_dir = Path(".") / ".tox"
374-
dst_dir.mkdir()
375-
for src_file in src_dir.glob("*/.coverage"):
376-
dst_file = dst_dir / ".coverage.{}".format(src_file.parent.name[9:])
377-
print("{} copy to {}".format(src_file, dst_file))
378-
shutil.copy(str(src_file), str(dst_file))'
379-
- name: Combine coverages
380-
run: python -m tox run -e coverage
381-
- name: Publish html coverage
382-
uses: actions/upload-artifact@v3
383-
with:
384-
name: overall_cov_html
385-
path: .tox/htmlcov
386-
- name: Publish xml coverage
387-
uses: actions/upload-artifact@v3
388-
with:
389-
name: overall_cov_xml
390-
path: .tox/coverage.xml
391-
- uses: codecov/codecov-action@v3
392-
with:
393-
files: .tox/coverage.xml
351+
# combine-coverage:
352+
# if: ${{ success() || failure() }}
353+
# name: Combine coverage
354+
# needs: [lint, test, test-fips, test-lambda]
355+
# runs-on: ubuntu-latest
356+
# steps:
357+
# - uses: actions/checkout@v3
358+
# - uses: actions/download-artifact@v3
359+
# with:
360+
# path: artifacts
361+
# - name: Set up Python
362+
# uses: actions/setup-python@v4
363+
# with:
364+
# python-version: '3.8'
365+
# - name: Display Python version
366+
# run: python -c "import sys; print(sys.version)"
367+
# - name: Upgrade setuptools and pip
368+
# run: python -m pip install -U setuptools pip wheel
369+
# - name: Install tox
370+
# run: python -m pip install tox>=4
371+
# - name: Collect all coverages to one dir
372+
# run: |
373+
# python -c '
374+
# from pathlib import Path
375+
# import shutil
376+
#
377+
# src_dir = Path("artifacts")
378+
# dst_dir = Path(".") / ".tox"
379+
# dst_dir.mkdir()
380+
# for src_file in src_dir.glob("*/.coverage"):
381+
# dst_file = dst_dir / ".coverage.{}".format(src_file.parent.name[9:])
382+
# print("{} copy to {}".format(src_file, dst_file))
383+
# shutil.copy(str(src_file), str(dst_file))'
384+
# - name: Combine coverages
385+
# run: python -m tox run -e coverage
386+
## - name: Publish html coverage
387+
## uses: actions/upload-artifact@v3
388+
## with:
389+
## name: overall_cov_html
390+
## path: .tox/htmlcov
391+
## - name: Publish xml coverage
392+
## uses: actions/upload-artifact@v3
393+
## with:
394+
## name: overall_cov_xml
395+
## path: .tox/coverage.xml
396+
# - uses: codecov/codecov-action@v3
397+
# with:
398+
# files: .tox/coverage.xml

0 commit comments

Comments
 (0)