diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eb690cb..05cc8d7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,10 @@ -name: CI +name: CI Workflow -on: [push, pull_request] +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] jobs: build: @@ -13,23 +17,28 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: '3.12.2' - name: Install dependencies run: | python -m pip install --upgrade pip pip install -r requirements.txt - - name: Run linting + - name: Run tests + run: | + python -m unittest discover test + + - name: Check code quality with flake8 run: | pip install flake8 - flake8 src/ + flake8 src test - - name: Run tests + - name: Static code analysis with pylint run: | - # Add your test command here if you have tests - echo "Tests would run here" + pip install pylint + pylint src test - - name: Check Python files + - name: Run security checks run: | - python -m compileall src/ + pip install bandit + bandit -r src test