Merge branch 'main' of https://github.com/Datapack-Hub/bot #90
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: Lint and Format | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
permissions: | |
contents: write | |
concurrency: | |
group: build-and-test | |
cancel-in-progress: true | |
jobs: | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Setup Python | |
uses: actions/[email protected] | |
with: | |
python-version: 3.11.x | |
cache: pip | |
architecture: x64 | |
check-latest: true | |
- name: Install ruff | |
run: | | |
pip install ruff -U | |
- name: Run ruff | |
run: | | |
ruff format . --preview | |
- uses: stefanzweifel/[email protected] | |
with: | |
commit_message: "Apply formatting" | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Setup Python | |
uses: actions/[email protected] | |
with: | |
python-version: 3.11.x | |
cache: pip | |
architecture: x64 | |
check-latest: true | |
- name: Install ruff | |
run: | | |
pip install ruff -U | |
- name: Run ruff | |
run: | | |
ruff . --fix --preview | |
- uses: stefanzweifel/[email protected] | |
with: | |
commit_message: "Apply linting" |