Skip to content

Add CI workflow with tests, lint, pip-audit, gitleaks #2

Add CI workflow with tests, lint, pip-audit, gitleaks

Add CI workflow with tests, lint, pip-audit, gitleaks #2

Workflow file for this run

name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["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: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Lint with ruff
run: |
ruff check .
ruff format --check .
- name: Run tests
run: |
python -m pytest tests/ -v --tb=short
- name: Run pip-audit
run: |
pip install pip-audit
pip-audit --desc
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run gitleaks
uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}