test 2 #7
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: Code Quality Checks | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
code-quality-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
- name: Install Python tools (Black with Jupyter, Bandit, Ruff) | |
run: pip install "black[jupyter]" bandit ruff | |
- name: Auto-fix Formatting Issues with Black | |
run: black . | |
- name: Auto-fix Linting Errors with Ruff | |
run: ruff --fix . | |
- name: Security Check with Bandit | |
run: bandit -r . | |
# Commit and push changes made by Black and Ruff | |
- name: Commit & Push changes | |
uses: actions-js/push@main | |
with: | |
github_token: ${{ secrets.MY_GITHUB_TOKEN }} |