Skip to content

chore: add some more Python snippets #683

chore: add some more Python snippets

chore: add some more Python snippets #683

Workflow file for this run

name: QA Checks
on:
push:
jobs:
runStyLua:
name: Format Lua Files
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Download and Setup Stylua
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release download --repo JohnnyMorganz/StyLua \
--pattern "stylua-linux-x86_64.zip"
unzip "stylua-linux-x86_64.zip"
cp stylua /usr/local/bin/
echo "Downloaded Stylua v$(stylua --version | grep --only-matching --perl-regexp '\d+\.\d+\.\d+')"
- name: Run the Stylua formatter for Lua code
run: stylua . --check
runSeleneLinter:
name: Lint Lua Files
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Download and Setup Selene
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release download --repo Kampfkarren/selene --pattern "selene-*-linux.zip"
unzip "selene-light-*-linux.zip"
cp selene /usr/local/bin/ && chmod u+x /usr/local/bin/selene
echo "Downloaded Selene v$(selene --version | grep --only-matching --perl-regexp '\d+\.\d+\.\d+')"
- name: Run Selene to Lint Lua Code
run: selene .
runRuff:
name: Lint Python Files
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Download and Setup Ruff
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pipx install ruff
- name: Run the Ruff Linter for Python Code
run: ruff check "$PWD"
runBlackFormatter:
name: Format Python Files
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Run the Black Formatter on Python Files
run: |
pip install black
black . --check