Skip to content

Commit 5a0f8af

Browse files
committed
Fix python workflow
1 parent 70a611d commit 5a0f8af

File tree

2 files changed

+165
-173
lines changed

2 files changed

+165
-173
lines changed

.github/workflows/python-lint.yml

+165
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,168 @@ jobs:
4444
env:
4545
ALL_CHANGED_FILES: ${{ steps.get-changed-files.outputs.all_changed_files }}
4646
run: ruff format $ALL_CHANGED_FILES
47+
48+
unit_tests_ubuntu_utc:
49+
name: Unit Testing (Ubuntu)
50+
needs: lint_stylecheck
51+
runs-on: ubuntu-latest
52+
strategy:
53+
matrix:
54+
python-version: ["3.8", "3.9", "3.10"]
55+
56+
steps:
57+
- name: Set Timezone
58+
run: sudo timedatectl set-timezone UTC
59+
60+
- uses: actions/checkout@v4
61+
- name: Copy README
62+
run: cp README.md python/
63+
64+
- uses: actions/setup-python@v5
65+
name: Setup Python
66+
with:
67+
python-version: ${{ matrix.python-version }}
68+
cache: "pip"
69+
cache-dependency-path: "python/setup.py"
70+
- run: pip install -e python[python,dev]
71+
72+
- name: Display Python version
73+
run: python --version
74+
75+
- name: Run Pytest suite
76+
run: pytest python/tests
77+
78+
unit_tests_ubuntu_pandas:
79+
name: Unit Testing (Ubuntu) (Pandas 1.x)
80+
needs: lint_stylecheck
81+
runs-on: ubuntu-latest
82+
83+
steps:
84+
- name: Set Timezone
85+
run: sudo timedatectl set-timezone UTC
86+
87+
- uses: actions/checkout@v4
88+
- name: Copy README
89+
run: cp README.md python/
90+
91+
- uses: actions/setup-python@v4
92+
name: Setup Python
93+
with:
94+
python-version: "3.10"
95+
cache: "pip"
96+
cache-dependency-path: "python/setup.py"
97+
- run: pip install -e python[python,dev-pandas1]
98+
99+
- name: Display Python version
100+
run: python --version
101+
102+
- name: Run Pytest suite
103+
run: pytest python/tests
104+
105+
unit_tests_ubuntu_local:
106+
name: Unit Testing (Ubuntu) (Local TZ)
107+
needs: lint_stylecheck
108+
runs-on: ubuntu-latest
109+
110+
steps:
111+
- name: Set Timezone
112+
run: sudo timedatectl set-timezone Europe/Amsterdam
113+
114+
- uses: actions/checkout@v4
115+
- name: Copy README
116+
run: cp README.md python/
117+
118+
- uses: actions/setup-python@v5
119+
name: Setup Python
120+
with:
121+
python-version: "3.10"
122+
cache: "pip"
123+
cache-dependency-path: "python/setup.py"
124+
- run: pip install -e 'python[python,dev]'
125+
126+
- name: Display Python version
127+
run: python --version
128+
129+
- name: Run Pytest suite
130+
run: pytest python/tests
131+
132+
unit_tests_ubuntu_typechecked:
133+
name: Typechecked Unit Testing (Ubuntu)
134+
needs: lint_stylecheck
135+
runs-on: ubuntu-latest
136+
137+
steps:
138+
- uses: actions/checkout@v3
139+
- name: Copy README
140+
run: cp README.md python/
141+
142+
- uses: actions/setup-python@v4
143+
name: Setup Python
144+
with:
145+
python-version: "3.10"
146+
cache: "pip"
147+
cache-dependency-path: "python/setup.py"
148+
- run: pip install -e python[python,dev,docs]
149+
150+
- name: Run Pytest suite
151+
env:
152+
HOPSWORKS_RUN_WITH_TYPECHECK: "true"
153+
run: pytest python/tests
154+
continue-on-error: true
155+
156+
unit_tests_windows_utc:
157+
name: Unit Testing (Windows)
158+
needs: lint_stylecheck
159+
runs-on: windows-latest
160+
161+
steps:
162+
- name: Set Timezone
163+
run: tzutil /s "UTC"
164+
165+
- uses: actions/checkout@v4
166+
- name: Copy README
167+
run: cp README.md python/
168+
169+
- uses: actions/setup-python@v5
170+
name: Setup Python
171+
with:
172+
python-version: "3.10"
173+
cache: "pip"
174+
cache-dependency-path: "python/setup.py"
175+
- run: pip install -e python[python,dev]
176+
177+
- name: Display Python version
178+
run: python --version
179+
180+
- name: Run Pytest suite
181+
run: pytest python/tests
182+
183+
unit_tests_windows_local:
184+
name: Unit Testing (Windows) (Local TZ)
185+
needs: lint_stylecheck
186+
runs-on: windows-latest
187+
188+
steps:
189+
- name: Set Timezone
190+
run: tzutil /s "W. Europe Standard Time"
191+
192+
- uses: actions/checkout@v4
193+
- name: Copy README
194+
run: cp README.md python/
195+
196+
- uses: actions/setup-python@v5
197+
name: Setup Python
198+
with:
199+
python-version: "3.10"
200+
cache: "pip"
201+
cache-dependency-path: "python/setup.py"
202+
- run: pip install -e python[python,dev]
203+
204+
- name: Display Python version
205+
run: python --version
206+
207+
- name: Display pip freeze
208+
run: pip freeze
209+
210+
- name: Run Pytest suite
211+
run: pytest python/tests

.github/workflows/python-tests.yml

-173
This file was deleted.

0 commit comments

Comments
 (0)