Skip to content

Security Center Hosts API Support #729

Security Center Hosts API Support

Security Center Hosts API Support #729

Workflow file for this run

name: Testing Pipeline
on:
push:
branches: [master]
pull_request:
types: [opened, synchronize, reopened]
jobs:
unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --all-extras --dev
- name: Run code linting
run: uv run ruff check tenable --exit-zero
- name: Run unit tests
run: uv run pytest --vcr-record=none tests --cov-report=term-missing --cov-report=xml:coverage.xml --cov=tenable
- name: Upload Coverage
uses: orgoro/[email protected]
with:
coverageFile: coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.python-version }}.xml
path: coverage.xml
retention-days: 1
overwrite: true
code-assessments:
needs: [unit-tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- uses: astral-sh/setup-uv@v4
# - uses: actions/download-artifact@v4
# with:
# name: coverage-3.10.xml
# path: coverage.xml
#
# - name: Upload Coverage
# uses: orgoro/[email protected]
# with:
# coverageFile: coverage.xml
# token: ${{ secrets.GITHUB_TOKEN }}
#
- name: Run pip-audit
run: uv export --format requirements-txt | uv tool run pip-audit
- name: Run Bandit code auditor
run: uv tool run --with "bandit[toml,baseline,sarif]" bandit -c pyproject.toml -r . -ll