Skip to content

chore: 移除临时文件 .output.txt,添加到 gitignore #109

chore: 移除临时文件 .output.txt,添加到 gitignore

chore: 移除临时文件 .output.txt,添加到 gitignore #109

Workflow file for this run

name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.11"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- 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('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install -e ml-sharp/
pip install pytest pytest-cov
- name: Run tests
run: |
pytest tests/ -v --tb=short
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install linting tools
run: |
python -m pip install --upgrade pip
pip install ruff black isort mypy
- name: Check code formatting with Black
run: black --check src/aylm tests
- name: Check import sorting with isort
run: isort --check-only src/aylm tests
- name: Lint with Ruff
run: ruff check src/aylm tests
- name: Type check with mypy (informational)
run: mypy src/aylm --ignore-missing-imports || echo "mypy found issues (non-blocking)"