-
Notifications
You must be signed in to change notification settings - Fork 5
161 lines (141 loc) · 4.89 KB
/
Copy pathtest-data-validation.yml
File metadata and controls
161 lines (141 loc) · 4.89 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
155
156
157
158
159
160
161
name: Test Data Validation
on:
workflow_dispatch:
inputs:
python-version:
description: 'Python version to test'
required: true
type: choice
options:
- '3.9'
- '3.10'
- '3.11'
- '3.12'
- '3.13'
default: '3.12'
jobs:
build-linux-wheel:
uses: ./.github/workflows/build-linux-wheel.yml
with:
python-version: ${{ inputs.python-version }}
timeout-minutes: 60
build-macos-wheel:
uses: ./.github/workflows/build-mac-wheel.yml
with:
python-version: ${{ inputs.python-version }}
timeout-minutes: 60
build-windows-wheel:
uses: ./.github/workflows/build-windows-wheel.yml
with:
python-version: ${{ inputs.python-version }}
python-tag: ${{ inputs.python-version == '3.9' && '39' || inputs.python-version == '3.10' && '310' || inputs.python-version == '3.11' && '311' || inputs.python-version == '3.12' && '312' || '313' }}
architecture: 'AMD64'
create-test-data:
needs: [build-linux-wheel, build-macos-wheel, build-windows-wheel]
strategy:
matrix:
include:
- os: ubuntu-latest
os-name: Linux
wheel-artifact: wheels-linux-${{ inputs.python-version }}
- os: macos-latest
os-name: macOS
wheel-artifact: wheels-macos-${{ inputs.python-version }}
- os: windows-latest
os-name: Windows
wheel-artifact: wheels-windows-${{ inputs.python-version }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- name: Download wheel
uses: actions/download-artifact@v4
with:
name: ${{ matrix.wheel-artifact }}
path: dist/
- name: Install wheel (Linux/macOS)
if: runner.os != 'Windows'
run: |
pip install dist/*.whl
- name: Install wheel (Windows)
if: runner.os == 'Windows'
run: |
$wheel = Get-ChildItem -Path dist/*.whl | Select-Object -First 1
pip install $wheel.FullName
- name: Create test data
run: |
python python_tests/scripts/create_test_data.py --out_dir ./test-data-${{ matrix.os-name }}
- name: Upload test data
uses: actions/upload-artifact@v4
with:
name: test-data-${{ matrix.os-name }}
path: test-data-${{ matrix.os-name }}/
retention-days: 1
validate-test-data:
needs: create-test-data
strategy:
matrix:
validator:
- os: ubuntu-latest
os-name: Linux
wheel-artifact: wheels-linux-${{ inputs.python-version }}
- os: macos-latest
os-name: macOS
wheel-artifact: wheels-macos-${{ inputs.python-version }}
- os: windows-latest
os-name: Windows
wheel-artifact: wheels-windows-${{ inputs.python-version }}
data-source: [Linux, macOS, Windows]
runs-on: ${{ matrix.validator.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- name: Download wheel for validator OS
uses: actions/download-artifact@v4
with:
name: ${{ matrix.validator.wheel-artifact }}
path: dist/
- name: Install wheel (Linux/macOS)
if: runner.os != 'Windows'
run: |
pip install dist/*.whl
- name: Install wheel (Windows)
if: runner.os == 'Windows'
run: |
$wheel = Get-ChildItem -Path dist/*.whl | Select-Object -First 1
pip install $wheel.FullName
- name: Download test data from ${{ matrix.data-source }}
uses: actions/download-artifact@v4
with:
name: test-data-${{ matrix.data-source }}
path: test-data-${{ matrix.data-source }}/
- name: Validate test data
run: |
python python_tests/scripts/validate_test_data.py --input_dir ./test-data-${{ matrix.data-source }}
cleanup:
needs: validate-test-data
if: always()
runs-on: ubuntu-latest
steps:
- name: Delete wheel artifacts
uses: geekyeggo/delete-artifact@v5
with:
name: |
wheels-linux-${{ inputs.python-version }}
wheels-macos-${{ inputs.python-version }}
wheels-windows-${{ inputs.python-version }}
failOnError: false
- name: Delete test data artifacts
uses: geekyeggo/delete-artifact@v5
with:
name: |
test-data-Linux
test-data-macOS
test-data-Windows
failOnError: false