mirror of
https://github.com/NVIDIA-NeMo/DataDesigner
synced 2026-05-24 09:48:29 +00:00
113 lines
2.6 KiB
YAML
113 lines
2.6 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
test:
|
|
name: Test (Python ${{ matrix.python-version }} on ${{ matrix.os }})
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest]
|
|
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v5
|
|
with:
|
|
version: "latest"
|
|
python-version: ${{ matrix.python-version }}
|
|
enable-cache: true
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
uv sync --group dev
|
|
|
|
- name: Run tests with coverage
|
|
run: |
|
|
uv run pytest -v --cov=data_designer --cov-report=term-missing --cov-report=xml --cov-fail-under=90
|
|
|
|
test-e2e:
|
|
name: End to end test (Python ${{ matrix.python-version }} on ${{ matrix.os }})
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest]
|
|
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v5
|
|
with:
|
|
version: "latest"
|
|
python-version: ${{ matrix.python-version }}
|
|
enable-cache: false
|
|
|
|
- name: Run e2e tests
|
|
run: |
|
|
make test-e2e
|
|
|
|
lint:
|
|
name: Lint and Format Check
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v5
|
|
with:
|
|
version: "latest"
|
|
python-version: "3.11"
|
|
enable-cache: true
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
uv sync --group dev
|
|
|
|
- name: Check formatting
|
|
run: |
|
|
uv run ruff format --check
|
|
|
|
- name: Run linter
|
|
run: |
|
|
uv run ruff check
|
|
|
|
license-headers:
|
|
name: Check License Headers
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0 # Full history needed for file creation dates
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v5
|
|
with:
|
|
version: "latest"
|
|
python-version: "3.11"
|
|
enable-cache: true
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
uv sync --group dev
|
|
|
|
- name: Check license headers
|
|
run: |
|
|
uv run python scripts/update_license_headers.py --check
|