Formatting #40
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
name: Formatting | |
on: | |
schedule: | |
- cron: '43 6 23 * *' | |
workflow_dispatch: | |
jobs: | |
formatting: | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Linting and import sort | |
uses: chartboost/ruff-action@v1 | |
with: | |
args: 'check --fix' | |
src: '.' | |
- name: Code formatting | |
uses: chartboost/ruff-action@v1 | |
with: | |
args: 'format' | |
src: '.' | |
- uses: astral-sh/setup-uv@v3 | |
with: | |
version: '0.4.27' | |
enable-cache: true | |
cache-dependency-glob: | | |
./pyproject.toml | |
- name: Run type checker on source | |
run: > | |
uvx | |
--python-preference only-system | |
--with tox-uv | |
tox@4.23.2 | |
run-parallel -vv | |
-m typecheck | |
- uses: peter-evans/create-pull-request@v7 | |
with: | |
branch: create-pull-request/formatting | |
delete-branch: true | |
title: 'Automatic formatting changes' | |
commit-message: 'style: automated formatting' | |
labels: bot | |
sign-commits: true | |
body: > | |
Automated formatting by | |
[ruff-action](https://github.com/ChartBoost/ruff-action) and | |
[create-pull-request](https://github.com/peter-evans/create-pull-request) | |