Some checks failed
CI / lint (pull_request) Failing after 36s
CI / typecheck (pull_request) Failing after 4s
CI / test (pull_request) Failing after 4s
CI / security (pull_request) Failing after 4s
CI / gitleaks (pull_request) Failing after 9s
CI / commitlint (pull_request) Successful in 19s
91 lines
2.4 KiB
YAML
91 lines
2.4 KiB
YAML
# SPDX-License-Identifier: MIT
|
|
# Copyright (c) 2026 Rug Munch Media LLC
|
|
# Part of Pry — https://git.rugmunch.io/RugMunchMedia/pryscraper
|
|
# Licensed under MIT. See LICENSE.
|
|
#
|
|
# Force workflow re-parse: bump cache key 2026-07-03-a
|
|
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
PYTHON_VERSION: "3.12"
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: docker-x64
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ env.PYTHON_VERSION }}
|
|
cache: pip
|
|
cache-dependency-path: pyproject.toml
|
|
- run: pip install ruff
|
|
- run: ruff check .
|
|
- run: ruff format --check .
|
|
|
|
typecheck:
|
|
runs-on: docker-x64
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ env.PYTHON_VERSION }}
|
|
cache: pip
|
|
cache-dependency-path: pyproject.toml
|
|
- run: pip install -e ".[dev]"
|
|
- run: mypy --python-version 3.12 --strict --ignore-missing-imports --exclude 'build/|dist/|.git/|__pycache__/' *.py
|
|
|
|
test:
|
|
runs-on: docker-x64
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ env.PYTHON_VERSION }}
|
|
cache: pip
|
|
cache-dependency-path: pyproject.toml
|
|
- run: pip install -e ".[dev]"
|
|
- run: pytest tests/ -v --cov=. --cov-report=term-missing --cov-fail-under=40
|
|
|
|
security:
|
|
runs-on: docker-x64
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ env.PYTHON_VERSION }}
|
|
cache: pip
|
|
cache-dependency-path: pyproject.toml
|
|
- run: pip install bandit
|
|
- run: bandit -r . -x tests/,.venv,__pycache__
|
|
|
|
gitleaks:
|
|
runs-on: docker-x64
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: gitleaks/gitleaks-action@v2
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
commitlint:
|
|
if: github.event_name == 'pull_request'
|
|
runs-on: docker-x64
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: wagoid/commitlint-github-action@v6
|
|
with:
|
|
configFile: .commitlintrc.yml
|