Create pytest output artifact [ci] (#98106)
This commit is contained in:
parent
7cf1ff887d
commit
e0d6210bd0
2 changed files with 38 additions and 4 deletions
41
.github/workflows/ci.yaml
vendored
41
.github/workflows/ci.yaml
vendored
|
@ -734,9 +734,12 @@ jobs:
|
||||||
- name: Run pytest (fully)
|
- name: Run pytest (fully)
|
||||||
if: needs.info.outputs.test_full_suite == 'true'
|
if: needs.info.outputs.test_full_suite == 'true'
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
|
id: pytest-full
|
||||||
run: |
|
run: |
|
||||||
. venv/bin/activate
|
. venv/bin/activate
|
||||||
python --version
|
python --version
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
python3 -X dev -m pytest \
|
python3 -X dev -m pytest \
|
||||||
-qq \
|
-qq \
|
||||||
--timeout=9 \
|
--timeout=9 \
|
||||||
|
@ -749,14 +752,17 @@ jobs:
|
||||||
--cov-report=xml \
|
--cov-report=xml \
|
||||||
-o console_output_style=count \
|
-o console_output_style=count \
|
||||||
-p no:sugar \
|
-p no:sugar \
|
||||||
tests
|
tests \
|
||||||
|
2>&1 | tee pytest-${{ matrix.python-version }}-${{ matrix.group }}.txt
|
||||||
- name: Run pytest (partially)
|
- name: Run pytest (partially)
|
||||||
if: needs.info.outputs.test_full_suite == 'false'
|
if: needs.info.outputs.test_full_suite == 'false'
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
|
id: pytest-partial
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
. venv/bin/activate
|
. venv/bin/activate
|
||||||
python --version
|
python --version
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
if [[ ! -f "tests/components/${{ matrix.group }}/__init__.py" ]]; then
|
if [[ ! -f "tests/components/${{ matrix.group }}/__init__.py" ]]; then
|
||||||
echo "::error:: missing file tests/components/${{ matrix.group }}/__init__.py"
|
echo "::error:: missing file tests/components/${{ matrix.group }}/__init__.py"
|
||||||
|
@ -774,7 +780,14 @@ jobs:
|
||||||
--durations=0 \
|
--durations=0 \
|
||||||
--durations-min=1 \
|
--durations-min=1 \
|
||||||
-p no:sugar \
|
-p no:sugar \
|
||||||
tests/components/${{ matrix.group }}
|
tests/components/${{ matrix.group }} \
|
||||||
|
2>&1 | tee pytest-${{ matrix.python-version }}-${{ matrix.group }}.txt
|
||||||
|
- name: Upload pytest output
|
||||||
|
if: success() || failure() && (steps.pytest-full.conclusion == 'failure' || steps.pytest-partial.conclusion == 'failure')
|
||||||
|
uses: actions/upload-artifact@v3.1.2
|
||||||
|
with:
|
||||||
|
name: pytest-${{ github.run_number }}
|
||||||
|
path: pytest-*.txt
|
||||||
- name: Upload coverage artifact
|
- name: Upload coverage artifact
|
||||||
uses: actions/upload-artifact@v3.1.2
|
uses: actions/upload-artifact@v3.1.2
|
||||||
with:
|
with:
|
||||||
|
@ -862,10 +875,13 @@ jobs:
|
||||||
python3 -m script.translations develop --all
|
python3 -m script.translations develop --all
|
||||||
- name: Run pytest (partially)
|
- name: Run pytest (partially)
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
|
id: pytest-partial
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
. venv/bin/activate
|
. venv/bin/activate
|
||||||
python --version
|
python --version
|
||||||
|
set -o pipefail
|
||||||
|
mariadb=$(echo "${{ matrix.mariadb-group }}" | sed "s/:/-/g")
|
||||||
|
|
||||||
python3 -X dev -m pytest \
|
python3 -X dev -m pytest \
|
||||||
-qq \
|
-qq \
|
||||||
|
@ -881,7 +897,14 @@ jobs:
|
||||||
tests/components/history \
|
tests/components/history \
|
||||||
tests/components/logbook \
|
tests/components/logbook \
|
||||||
tests/components/recorder \
|
tests/components/recorder \
|
||||||
tests/components/sensor
|
tests/components/sensor \
|
||||||
|
2>&1 | tee pytest-${{ matrix.python-version }}-${mariadb}.txt
|
||||||
|
- name: Upload pytest output
|
||||||
|
if: success() || failure() && steps.pytest-partial.conclusion == 'failure'
|
||||||
|
uses: actions/upload-artifact@v3.1.2
|
||||||
|
with:
|
||||||
|
name: pytest-${{ github.run_number }}
|
||||||
|
path: pytest-*.txt
|
||||||
- name: Upload coverage artifact
|
- name: Upload coverage artifact
|
||||||
uses: actions/upload-artifact@v3.1.2
|
uses: actions/upload-artifact@v3.1.2
|
||||||
with:
|
with:
|
||||||
|
@ -969,10 +992,13 @@ jobs:
|
||||||
python3 -m script.translations develop --all
|
python3 -m script.translations develop --all
|
||||||
- name: Run pytest (partially)
|
- name: Run pytest (partially)
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
|
id: pytest-partial
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
. venv/bin/activate
|
. venv/bin/activate
|
||||||
python --version
|
python --version
|
||||||
|
set -o pipefail
|
||||||
|
postgresql=$(echo "${{ matrix.postgresql-group }}" | sed "s/:/-/g")
|
||||||
|
|
||||||
python3 -X dev -m pytest \
|
python3 -X dev -m pytest \
|
||||||
-qq \
|
-qq \
|
||||||
|
@ -989,7 +1015,14 @@ jobs:
|
||||||
tests/components/history \
|
tests/components/history \
|
||||||
tests/components/logbook \
|
tests/components/logbook \
|
||||||
tests/components/recorder \
|
tests/components/recorder \
|
||||||
tests/components/sensor
|
tests/components/sensor \
|
||||||
|
2>&1 | tee pytest-${{ matrix.python-version }}-${postgresql}.txt
|
||||||
|
- name: Upload pytest output
|
||||||
|
if: success() || failure() && steps.pytest-partial.conclusion == 'failure'
|
||||||
|
uses: actions/upload-artifact@v3.1.2
|
||||||
|
with:
|
||||||
|
name: pytest-${{ github.run_number }}
|
||||||
|
path: pytest-*.txt
|
||||||
- name: Upload coverage artifact
|
- name: Upload coverage artifact
|
||||||
uses: actions/upload-artifact@v3.1.0
|
uses: actions/upload-artifact@v3.1.0
|
||||||
with:
|
with:
|
||||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -67,6 +67,7 @@ htmlcov/
|
||||||
test-reports/
|
test-reports/
|
||||||
test-results.xml
|
test-results.xml
|
||||||
test-output.xml
|
test-output.xml
|
||||||
|
pytest-*.txt
|
||||||
|
|
||||||
# Translations
|
# Translations
|
||||||
*.mo
|
*.mo
|
||||||
|
|
Loading…
Add table
Reference in a new issue