-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (48 loc) · 1.7 KB
/
check-python-eol-actions.yml
File metadata and controls
48 lines (48 loc) · 1.7 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
name: Check Python Version End of Life
on:
workflow_dispatch:
schedule:
- cron: '0 14 * * *' # 2pm UTC == 9am EST
jobs:
check_python_version_eol:
runs-on: ubuntu-latest
steps:
- name: Checkout STUMPY
uses: actions/checkout@v4
with:
repository: stumpy-dev/stumpy
- name: Upgrade Pip, Install Minimum Requirements
run: |
python -m pip install --upgrade pip pandas lxml packaging
shell: bash
- name: Determine Safe Python Version
id: get_safe_python
run: |
echo "safe_python=$(python ./versions.py -mode safe)" >> $GITHUB_OUTPUT
- name: Set Up Python
uses: actions/setup-python@v5
with:
python-version: ${{ steps.get_safe_python.outputs.safe_python }}
- name: Upgrade Pip, Install Minimum Requirements For Safe Python
run: |
python -m pip install --upgrade pip pandas lxml packaging
shell: bash
- name: Display Python Version
run: python -c "import sys; print(sys.version)"
shell: bash
- name: Checkout STUMPY
uses: actions/checkout@v4
with:
repository: stumpy-dev/stumpy
- name: Check Python Version End of Life
run: |
# Test script first
python ./versions.py
if [[ `python ./versions.py | grep python | grep Mismatch | wc -l` -gt "0" ]]; then
echo "Bump minimum version due to Python end-of-life"
echo "See https://devguide.python.org/versions/#status-of-python-versions"
exit 1
else
echo "No action needed. The minimum STUMPY Python version reported above is still supported!"
fi
shell: bash