Skip to content

Automatical mesh refinement in layered structures #7640

Automatical mesh refinement in layered structures

Automatical mesh refinement in layered structures #7640

Workflow file for this run

name: "tidy3d-frontend-tests"
on:
workflow_dispatch:
inputs:
run_tests:
description: 'Run test suite'
type: boolean
default: false
push:
branches: [ develop, latest ]
pull_request:
branches:
- latest
- develop
- 'pre/*'
jobs:
lint:
name: Run linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: astral-sh/ruff-action@v3
with:
version: 0.5.5
- name: Run ruff format
run: ruff format --check --diff
- name: Run ruff check
run: ruff check tidy3d
test:
# Run on internal PRs/pushes OR when manually triggered with run_tests=true
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository || (github.event_name == 'workflow_dispatch' && inputs.run_tests)
name: Python ${{ matrix.python-version }} - ${{ matrix.platform }}
runs-on: ${{ matrix.platform }}
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
platform: [ubuntu-latest, windows-latest, macos-latest]
defaults:
run:
shell: bash
env: # Set environment variables for the whole job
PIP_ONLY_BINARY: gdstk
MPLBACKEND: agg
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.8.2
virtualenvs-create: true
virtualenvs-in-project: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install project
run: |
poetry --version
poetry env use python
poetry env info
poetry run pip install --upgrade pip wheel setuptools
poetry run pip install gdstk --only-binary gdstk
poetry install -E dev
- name: Run doctests
run: |
poetry run pytest -rF --tb=short tidy3d
- name: Run tests
env:
PYTHONUNBUFFERED: "1"
run: |
poetry run pytest -rF --tb=short tests/_test_data/_test_datasets_no_vtk.py
poetry run pytest -rF --tb=short tests