Skip to content

Merge pull request #594 from gdsfactory/exports #1884

Merge pull request #594 from gdsfactory/exports

Merge pull request #594 from gdsfactory/exports #1884

Workflow file for this run

name: Test pre-commit, code and docs
on:
pull_request:
push:
branches:
- main
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: "pip"
cache-dependency-path: pyproject.toml
- name: setup-mypy
run: |
python -m pip install uv wheel
uv pip install --system -U -e .[ci] mypy
mypy -p kfactory
mypy --install-types --non-interactive
- uses: pre-commit/[email protected]
test_code:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 12
matrix:
python-version:
- "3.11"
- "3.12"
- "3.13"
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
- name: Install dependencies
env:
GH_TOKEN: ${{ github.token }}
run: |
uv venv -p ${{ matrix.python-version }}
make test-venv
make gds-download
- name: Test with pytest
env:
KFACTORY_LOGFILTER_LEVEL: "ERROR"
run: make test
coverage:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 12
matrix:
python-version:
- "3.13"
os: [macos-latest]
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
make test-venv
- name: Test coverage
run: |
make cov
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
test_docs:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 12
matrix:
python-version:
- "3.13"
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
activate-environment: anaconda-client-env
- name: Install dependencies
run: |
python -m pip install --user -U uv wheel
uv pip install --system -e .[docs,ci]
python -m ipykernel install --user --name python3
make install
- name: Test documentation
run: |
make docs