Skip to content
Closed

actions #5760

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/actions/python-versions/action.yml
Original file line number Diff line number Diff line change
@@ -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 changes: 15 additions & 0 deletions .github/actions/python-versions/run.py
Original file line number Diff line number Diff line change
@@ -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)
24 changes: 0 additions & 24 deletions .github/workflows/lock.yaml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/publish.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: pre-commit
name: shared
on:
pull_request:
push:
Expand All @@ -16,10 +16,4 @@ jobs:
id: setup-python
with:
python-version-file: pyproject.toml
- uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ hashFiles('pyproject.toml', '.pre-commit-config.yaml') }}
- run: uv run --locked --group pre-commit pre-commit run --show-diff-on-failure --color=always --all-files
- uses: pre-commit-ci/lite-action@5d6cc0eb514c891a40562a58a8e71576c5c7fb43 # v1.1.0
if: ${{ !cancelled() }}
- uses: ./.github/actions/python-versions
51 changes: 0 additions & 51 deletions .github/workflows/tests.yaml

This file was deleted.

Loading