Update numpy requirement from ~=1.24.4 to ~=2.1.0 #48
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: python version check | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
inputs: | |
manual: | |
description: "Trigger the workflow manually" | |
required: false | |
jobs: | |
test: | |
name: python version check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Get current required Python version | |
id: get-python-versions | |
run: | | |
MINIMUM_VERSION=$(grep -oP '__version_minimum_python__ = "\K.*(?=")' leeger/_version.py) | |
echo "CURRENT_VERSION=$MINIMUM_VERSION" >> $GITHUB_ENV | |
OLD_VERSION="${MINIMUM_VERSION%.*}.$((${MINIMUM_VERSION##*.}-1))" | |
echo "OLD_VERSION=$OLD_VERSION" >> $GITHUB_ENV | |
- name: Set up current Python version | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ env.CURRENT_VERSION }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: setup.py with current required Python version works | |
run: | | |
python setup.py install | |
- name: Set up invalid Python version | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ env.OLD_VERSION }} | |
- name: setup.py with invalid Python version fails | |
run: | | |
! python setup.py install |