Skip to content

OpenAstronomy/supported-pythons

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

supported-pythons

test

retrieve active (not end-of-life) minor versions of Python supported by a Python package

input description
package package source repository containing pyproject.toml
package-ref branch or tag of package source
no-eoas also omit end-of-active-support versions of Python
output description
versions Python minor versions as a JSON list
oldest oldest supported Python minor version
latest latest supported Python minor version
jobs:
  supported-pythons:
    runs-on: ubuntu-latest
    steps:
      - id: supported-pythons
        uses: OpenAstronomy/supported-pythons@2.0.4
        with:
          package: spacetelescope/romancal
    outputs:
      versions: ${{ steps.supported-pythons.outputs.versions }}
      oldest: ${{ steps.supported-pythons.outputs.oldest }}
      latest: ${{ steps.supported-pythons.outputs.latest }}
  test:
    needs: supported-pythons
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ${{ fromJSON(needs.supported-pythons.outputs.versions) }}
        include:
          - name: run tests (oldest Python)
            python-version: ${{ steps.supported-pythons.outputs.oldest }}
          - name: run tests (latest Python)
            python-version: ${{ steps.supported-pythons.outputs.latest }}
      fail-fast: false
    name: ${{ matrix.name || format('run tests (Python {0})', matrix.python-version) }}
    steps:
      - uses: actions/setup-python@v6
        with:
          python-version: ${{ matrix.python-version }}
      - uses: actions/checkout@v6
      - run: pip install . pytest
      - run: pytest

About

retrieve active (not end-of-life) minor versions of Python supported by a Python package

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages