Skip to content

Poetry Dep(deps-dev): Bump flake8 from 7.1.1 to 7.1.2 #231

Poetry Dep(deps-dev): Bump flake8 from 7.1.1 to 7.1.2

Poetry Dep(deps-dev): Bump flake8 from 7.1.1 to 7.1.2 #231

Workflow file for this run

name: Scan, Build, and Test
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
permissions:
contents: read
jobs:
securityscan:
permissions:
contents: read
security-events: write
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Security check with Bandit
uses: PyCQA/bandit-action@8a1b30610f61f3f792fe7556e888c9d7dffa52de
with:
severity: "medium"
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.13"]
steps:
# 1. Check out the repository
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
# 2. Set up Python environment
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: ${{ matrix.python-version }}
# 3. Install Poetry
- name: Install Poetry
run: pipx install poetry==1.8.4
# 4. Cache Poetry dependencies
- name: Cache Poetry
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: |
~/.cache/pypoetry
~/.local/share/pypoetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
# 5. Install project dependencies using Poetry
- name: Install dependencies
run: |
poetry install
# 6. Cache test dependencies
- name: Cache test dependencies
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-test-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-test-
# 7. Lint with flake8 - Errors
- name: Lint with flake8 (Errors)
run: |
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
continue-on-error: false
# 8. Lint with flake8 - Warnings
- name: Lint with flake8 (Warnings)
run: |
poetry run flake8 . --count --exit-zero --max-complexity=9 --max-line-length=127 --statistics
continue-on-error: true
# 9. Run tests with pytest
- name: Test with pytest
run: |
poetry run pytest --junitxml=reports/junit.xml --cov=graphedexcel --cov-report=xml
# 10. Upload test coverage to Codecov (Optional)
- name: Upload results to Codecov
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
# 11. Upload Test Reports (Optional)
- name: Upload Test Report
if: always()
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: dist-${{ matrix.python-version }}-junit-test-report
path: reports/junit.xml