mirror of
https://github.com/wickedyoda/public-setupfiles.git
synced 2026-11-16 13:31:56 -06:00
Added code checking
Added code checking
This commit is contained in:
1 parent
2aadd9871b
commit
c20de0ee6a
7 files changed
+50
-44
No files matched your search
@@ -0,0 +1,50 @@
|
||||
name: Code Quality Check
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '**.py'
|
||||
- '**.sh'
|
||||
pull_request:
|
||||
paths:
|
||||
- '**.py'
|
||||
- '**.sh'
|
||||
|
||||
jobs:
|
||||
lint-python:
|
||||
name: Python Code Linting
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Install Python linters
|
||||
run: |
|
||||
pip install black flake8
|
||||
|
||||
- name: Run black
|
||||
run: black --check .
|
||||
|
||||
- name: Run flake8
|
||||
run: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||
|
||||
lint-shell:
|
||||
name: Shell Script Linting
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install shellcheck
|
||||
run: sudo apt-get install -y shellcheck
|
||||
|
||||
- name: Run shellcheck
|
||||
run: |
|
||||
find . -type f -name "*.sh" -exec shellcheck {} +
|
||||
Reference in new issue
Block a user