work
This commit is contained in:
parent
85c5d93cbd
commit
2d578d8c53
6 changed files with 43 additions and 128 deletions
26
.github/actions/python-versions/action.yml
vendored
Normal file
26
.github/actions/python-versions/action.yml
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
name: get test environments
|
||||
description: Inspect a Python project and generate a test environment matrix.
|
||||
inputs:
|
||||
windows-env:
|
||||
description: Include a Windows environment with the latest Python version.
|
||||
required: false
|
||||
default: 'false'
|
||||
macos-env:
|
||||
description: Include a macOS environment with the latest Python version.
|
||||
required: false
|
||||
default: 'false'
|
||||
extra-envs:
|
||||
description: Add these additional environments to the output.
|
||||
required: false
|
||||
default: ''
|
||||
outputs:
|
||||
matrix:
|
||||
description: A JSON list of test environments.
|
||||
value: ${{ steps.run.outputs.matrix }}
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: get test environments
|
||||
id: run
|
||||
shell: bash
|
||||
run: python3 -Iu '${{github.action_path}}/run.py'
|
||||
15
.github/actions/python-versions/run.py
vendored
Normal file
15
.github/actions/python-versions/run.py
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import configparser
|
||||
import os
|
||||
import tomllib
|
||||
|
||||
tox_conf = configparser.ConfigParser(interpolation=None)
|
||||
tox_conf.read("tox.ini", "utf-8")
|
||||
|
||||
with open("pyproject.toml", "rb") as f:
|
||||
pyproj = tomllib.load(f)
|
||||
|
||||
print(tox_conf)
|
||||
print(tomllib)
|
||||
|
||||
with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as f:
|
||||
print("[]", file=f)
|
||||
Loading…
Add table
Add a link
Reference in a new issue