Skip to content

separate CI jobs for format/lint #1517

separate CI jobs for format/lint

separate CI jobs for format/lint #1517

Workflow file for this run

name: CI
on:
push:
branches:
- "master"
- "uv"
pull_request:
branches:
- "master"
- "dev"
schedule:
# every two weeks on Monday at 3 am
- cron: "0 3/336 * * 1"
jobs:
test:
name: Pytest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Install the project
run: |
uv sync --all-extras --dev
uv pip install -e .
- name: Run tests
run: |
PYTEST_ARGS="--nbval-lax --nbval-current-env --dist loadscope --numprocesses 2"
PYTEST_IGNORE_T001="--ignore=teachopencadd/talktorials/T001_query_chembl/talktorial.ipynb"
IGNORE="$PYTEST_IGNORE_T001"
uv run pytest $PYTEST_ARGS teachopencadd/talktorials/T00{2,3,4,5,6,7,8,9}* $IGNORE
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff
- name: Run Ruff
run: ruff check --output-format=github .
format:
name: Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff
- name: Run Ruff
run: ruff --diff --line-length 99