44name : Latest commit
55
66env :
7- CACHE_VERSION : 6
8- DEFAULT_PYTHON : " 3.11 "
7+ CACHE_VERSION : 9
8+ DEFAULT_PYTHON : " 3.12 "
99 PRE_COMMIT_HOME : ~/.cache/pre-commit
1010
1111on :
6565 . venv/bin/activate
6666 pre-commit install-hooks
6767
68- black :
68+ ruff :
6969 runs-on : ubuntu-latest
70- name : Black check and force
70+ name : Ruff check and force
7171 needs : prepare
7272 steps :
7373 - name : Check out committed code
@@ -94,27 +94,27 @@ jobs:
9494 run : |
9595 echo "Failed to restore Python ${{ env.DEFAULT_PYTHON }} virtual environment from cache"
9696 exit 1
97- - name : Run black --check --exclude venv .
97+ - name : Ruff (with fix)
9898 run : |
9999 . venv/bin/activate
100- black --check --exclude venv .
101- - name : If needed, commit black changes to the pull request
100+ ruff plugwise/*py tests/*py
101+ - name : If needed, commit ruff changes to the pull request
102102 if : failure()
103103 run : |
104104 . venv/bin/activate
105- black --exclude venv .
106- git config --global user.name 'autoblack '
105+ ruff --fix plugwise/*py tests/*py
106+ git config --global user.name 'autoruff '
107107 git config --global user.email 'plugwise@users.noreply.github.com'
108108 git remote set-url origin https://x-access-token:${{ secrets.PAT_CT }}@github.com/$GITHUB_REPOSITORY
109109 git checkout $GITHUB_HEAD_REF
110- git commit -am "fixup: ${GITHUB_REF##*/} Python code reformatted using Black "
110+ git commit -am "fixup: ${GITHUB_REF##*/} Python code fixed using ruff "
111111 git push origin ${GITHUB_REF##*/}
112112
113113 commitcheck :
114114 runs-on : ubuntu-latest
115115 name : Check commit
116116 needs :
117- - black
117+ - ruff
118118 - shellcheck
119119 - dependencies_check
120120 steps :
@@ -167,7 +167,7 @@ jobs:
167167 needs : commitcheck
168168 strategy :
169169 matrix :
170- python-version : ["3.12", "3.11", "3.10" ]
170+ python-version : ["3.12"]
171171 steps :
172172 - name : Check out committed code
173173 uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
@@ -206,7 +206,7 @@ jobs:
206206 needs : prepare-test-cache
207207 strategy :
208208 matrix :
209- python-version : ["3.12", "3.11", "3.10" ]
209+ python-version : ["3.12"]
210210
211211 steps :
212212 - name : Check out committed code
@@ -360,9 +360,14 @@ jobs:
360360 run : |
361361 echo "Failed to restore Python virtual environment from cache"
362362 exit 1
363- - name : Build a distribution
363+ - name : Install pypa/build
364364 run : >-
365- python setup.py sdist
365+ python3 -m
366+ pip install
367+ build
368+ --user
369+ - name : Build a binary wheel and a source tarball
370+ run : python3 -m build
366371 - name : Publish distribution 📦 to Test PyPI
367372 uses : pypa/gh-action-pypi-publish@release/v1
368373 continue-on-error : true
0 commit comments