Skip to content

Multi Trace Inference #555

Multi Trace Inference

Multi Trace Inference #555

name: Pre-commit checks
on:
push:
branches:
- main
paths:
- '.github/workflows/**'
- 'mldaikon/**'
- 'tests/**'
pull_request:
paths:
- '.github/workflows/**'
- 'mldaikon/**'
- 'tests/**'
jobs:
pre-commit:
runs-on: self-hosted
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10' # Specify your Python version here
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black==24.3.0
pip install mypy==1.9.0
pip install isort
pip install ruff==0.3.3
pip install torch
pip install polars
pip install tqdm
pip install bytecode
pip install deepdiff
- name: Run black
id: black
run: black --check . --exclude tests
- name: Run mypy
id: mypy
run: mypy . --install-types --non-interactive --ignore-missing-imports --exclude tests
- name: Run isort
id: isort
run: isort --check --profile=black . --skip tests
- name: Run ruff
id: ruff
run: ruff check . --exclude tests
- name: Check if any checks failed
if: failure()
run: echo "Some pre-commit checks have failed. Please run 'pre-commit run --all-files' locally and fix the issues."
- name: Set job status
if: failure()
run: exit 1