Repository navigation
154 lines (150 loc) · 5.42 KB
/
Copy pathpush_checks.yaml
File metadata and controls
154 lines (150 loc) · 5.42 KB
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
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Tests
on:
push:
branches:
- develop
pull_request:
schedule:
- cron: "17 9 * * 1"
workflow_dispatch:
inputs:
diagnostic_no_cov:
description: "Run pytest without coverage and live log CLI to diagnose teardown hangs"
required: false
default: false
type: boolean
jobs:
test:
if: github.event_name != 'schedule'
runs-on: ${{ matrix.operating-system }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- operating-system: windows-latest
python-version: "3.9"
python-tag: py39
- operating-system: windows-latest
python-version: "3.10"
python-tag: py310
- operating-system: windows-latest
python-version: "3.11"
python-tag: py311
env:
MPLBACKEND: Agg # https://github.com/microsoft/azure-pipelines-tasks/issues/16426
steps:
- uses: actions/checkout@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: constraints/windows-${{ matrix.python-tag }}.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -c constraints/windows-${{ matrix.python-tag }}.txt -e ".[dev]"
- name: Record resolved environment
run: python -m pip freeze --all
- name: Test with pytest
timeout-minutes: 45
env:
NAVIGATE_RUN_PLUGIN_INTEGRATION: "1"
COVERAGE_FILE: .coverage.${{ matrix.python-tag }}
run: |
if ("${{ github.event_name }}" -eq "workflow_dispatch" -and "${{ github.event.inputs.diagnostic_no_cov }}" -eq "true") {
python3 -m pytest --durations=25 --no-cov -o log_cli=false
} else {
python3 -m pytest --durations=25
if (Test-Path coverage.xml) {
Move-Item -Force coverage.xml "coverage-${{ matrix.python-tag }}.xml"
} else {
Write-Error "coverage.xml was not produced."
}
}
- name: Dump Python processes (Windows)
if: ${{ failure() && runner.os == 'Windows' }}
shell: pwsh
run: |
Write-Host "Tasklist snapshot for python processes:"
tasklist /v /fo table | Select-String -Pattern "python"
Write-Host "Detailed process snapshot for python executables:"
Get-CimInstance Win32_Process |
Where-Object { $_.Name -match '^python(3)?(\.exe)?$' } |
Select-Object ProcessId, ParentProcessId, Name, CommandLine |
Format-List
- name: Codecov
if: ${{ !(github.event_name == 'workflow_dispatch' && github.event.inputs.diagnostic_no_cov == 'true') }}
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage/reports/
env_vars: OS,PYTHON
fail_ci_if_error: false
files: ./coverage-${{ matrix.python-tag }}.xml
flags: unittests-${{ matrix.python-tag }}
name: codecov-${{ matrix.operating-system }}-${{ matrix.python-tag }}
verbose: true
experimental-python:
name: Experimental Python 3.12
if: github.event_name != 'schedule'
continue-on-error: true
runs-on: windows-latest
timeout-minutes: 60
env:
MPLBACKEND: Agg
NAVIGATE_RUN_PLUGIN_INTEGRATION: "1"
COVERAGE_FILE: .coverage.py312
steps:
- uses: actions/checkout@v7
- name: Set up Python 3.12
uses: actions/setup-python@v7
with:
python-version: "3.12"
cache: pip
cache-dependency-path: constraints/windows-py312.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -c constraints/windows-py312.txt -e ".[dev]"
- name: Record resolved environment
run: python -m pip freeze --all
- name: Test with pytest
timeout-minutes: 45
run: python -m pytest --durations=25
- name: Dump Python processes (Windows)
if: ${{ failure() }}
shell: pwsh
run: |
Write-Host "Tasklist snapshot for python processes:"
tasklist /v /fo table | Select-String -Pattern "python"
Write-Host "Detailed process snapshot for python executables:"
Get-CimInstance Win32_Process |
Where-Object { $_.Name -match '^python(3)?(\.exe)?$' } |
Select-Object ProcessId, ParentProcessId, Name, CommandLine |
Format-List
latest-dependencies:
name: Latest dependencies (scheduled advisory)
if: github.event_name == 'schedule'
runs-on: windows-latest
timeout-minutes: 60
env:
MPLBACKEND: Agg
NAVIGATE_RUN_PLUGIN_INTEGRATION: "1"
steps:
- uses: actions/checkout@v7
- name: Set up Python 3.10
uses: actions/setup-python@v7
with:
python-version: "3.10"
cache: pip
cache-dependency-path: pyproject.toml
- name: Install latest dependencies without constraints
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Test with pytest
timeout-minutes: 45
run: python -m pytest --durations=25