-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
2,277 additions
and
4,077 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: "Common steps to install and cache dependencies" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install uv | ||
uses: astral-sh/setup-uv@v3 | ||
with: | ||
enable-cache: true | ||
|
||
- name: Set up Python | ||
shell: bash | ||
run: | | ||
uv python install | ||
echo "PYTHON_VERSION=$(uv run python -c 'import platform; print(platform.python_version())')" >> "$GITHUB_ENV" | ||
- name: Install dependencies with uv | ||
shell: bash | ||
run: uv sync |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
dependencies: | ||
- any: ["poetry.lock"] | ||
- any: ["uv.lock"] | ||
all: ["!**/*.py"] | ||
|
||
documentation: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,9 +6,6 @@ on: | |
- master | ||
pull_request: | ||
|
||
env: | ||
DEFAULT_PYTHON: "3.12" | ||
|
||
jobs: | ||
hacs: | ||
runs-on: ubuntu-latest | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,9 +6,6 @@ on: | |
- master | ||
pull_request: | ||
|
||
env: | ||
PYTHON_VERSION: "3.12" | ||
|
||
jobs: | ||
pre-commit: | ||
name: Pre-commit | ||
|
@@ -17,23 +14,27 @@ jobs: | |
- name: Check out the repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ env.PYTHON_VERSION }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
- name: Prepare and install deps | ||
uses: ./.github/actions/install-deps | ||
|
||
- name: Install Poetry | ||
uses: abatilo/[email protected] | ||
- uses: actions/cache@v4 | ||
name: Cache pre-commit hooks | ||
with: | ||
poetry-version: 1.3.2 | ||
|
||
- name: Install dependencies | ||
run: poetry install | ||
path: ~/.cache/pre-commit/ | ||
key: > | ||
${{ format('pre-commit-{0}-{1}-{2}', | ||
runner.os, | ||
matrix.python-version, | ||
hashFiles('.pre-commit-config.yaml') | ||
) }} | ||
restore-keys: | | ||
pre-commit-${{ runner.os }}-${{ matrix.python-version }}- | ||
pre-commit-${{ runner.os }}- | ||
- name: Run pre-commit on all files | ||
run: | | ||
poetry run pre-commit run --all-files --show-diff-on-failure --color=always | ||
uvx pre-commit run --all-files --show-diff-on-failure --color=always | ||
- name: Run python-typing-update | ||
run: | | ||
poetry run pre-commit run --hook-stage manual python-typing-update --all-files --show-diff-on-failure --color=always | ||
uvx pre-commit run --hook-stage manual python-typing-update --all-files --show-diff-on-failure --color=always |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,9 +3,6 @@ name: Publish new release | |
on: | ||
workflow_dispatch: | ||
|
||
env: | ||
PYTHON_VERSION: "3.12" | ||
|
||
jobs: | ||
publish: | ||
name: Update manifest and publish | ||
|
@@ -14,21 +11,11 @@ jobs: | |
- name: Check out the repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ env.PYTHON_VERSION }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
|
||
- name: Install Poetry | ||
uses: abatilo/[email protected] | ||
with: | ||
poetry-version: 1.3.2 | ||
|
||
- name: Install dependencies | ||
run: poetry install | ||
- name: Prepare and install deps | ||
uses: ./.github/actions/install-deps | ||
|
||
- name: Run script | ||
run: | | ||
poetry run python script/publish_release.py | ||
uv run python script/publish_release.py | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.ADMIN_TOKEN }} |
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
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
Oops, something went wrong.