Skip to content

Add py check wf

Add py check wf #1

name: Version Check
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
jobs:
check-versions:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install yq for toml parsing
run: pip install yq
- name: Read Python versions from pyproject.toml
id: versions
run: |
PYTHON_VERSION=$(tomlq -r .tool.poetry.dependencies.python < pyproject.toml | tr -d '"')
MATPLOTLIB_VERSION=$(tomlq -r .tool.poetry.dependencies.matplotlib < pyproject.toml | tr -d '"')
echo "python_version=$PYTHON_VERSION" >> $GITHUB_OUTPUT
echo "matplotlib_version=$MATPLOTLIB_VERSION" >> $GITHUB_OUTPUT
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ steps.versions.outputs.python_version }}