Limit potential for repeated rollbar reporting #7
This file contains hidden or 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 | |
| on: | |
| push: | |
| branches: [ main, master, develop ] | |
| pull_request: | |
| branches: [ main, master, develop ] | |
| jobs: | |
| code-quality: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.11" | |
| - name: Cache pip dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-ruff-${{ hashFiles('**/requirements*.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-ruff- | |
| - name: Install ruff | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install ruff | |
| - name: Run ruff format check | |
| run: | | |
| ruff format --check . | |
| - name: Run ruff linter | |
| run: | | |
| ruff check . | |
| - name: Run ruff with annotations | |
| if: always() | |
| run: | | |
| ruff check --output-format=github . | |
| security-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.11" | |
| - name: Install bandit | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install bandit[toml] | |
| - name: Run bandit security check | |
| run: | | |
| bandit -r gefcore/ -f json -o bandit-report.json || true | |
| bandit -r gefcore/ | |
| - name: Upload bandit report | |
| uses: actions/upload-artifact@v3 | |
| if: always() | |
| with: | |
| name: bandit-security-report | |
| path: bandit-report.json |