Skip to content

Update ANALYZERS.md with Phase 3 header specifications #16

Update ANALYZERS.md with Phase 3 header specifications

Update ANALYZERS.md with Phase 3 header specifications #16

Workflow file for this run

name: Tests
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip packages
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install pytest pytest-cov pytest-mock
- name: Run tests with coverage
run: |
pytest --cov=sha --cov-report=xml --cov-report=term-missing --cov-report=html
- name: Upload coverage to Codecov
if: matrix.python-version == '3.12'
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
- name: Archive coverage report
if: matrix.python-version == '3.12'
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: htmlcov/
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black isort flake8 mypy bandit[toml]
pip install -e .
- name: Check code formatting with black
run: black --check sha/ tests/
- name: Check import sorting with isort
run: isort --check-only sha/ tests/
- name: Lint with flake8
run: |
# Stop the build if there are Python syntax errors or undefined names
flake8 sha/ tests/ --count --select=E9,F63,F7,F82 --show-source --statistics
# Exit-zero treats all errors as warnings. Max line length 100 chars
flake8 sha/ tests/ --count --max-complexity=10 --max-line-length=100 --statistics
- name: Type check with mypy
run: mypy sha/
- name: Security check with bandit
run: bandit -r sha/ -c pyproject.toml
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pip-audit
pip install -e .
- name: Run pip-audit
run: pip-audit