Skip to content

public/tidy3d/python-client-develop-cli #429

public/tidy3d/python-client-develop-cli

public/tidy3d/python-client-develop-cli #429

name: "public/tidy3d/python-client-develop-cli"
on:
workflow_dispatch:
inputs:
release_tag:
description: 'Release Tag (v2.10.0, v2.10.0rc1)'
required: false
type: string
default: ''
workflow_call:
inputs:
release_tag:
description: 'Release Tag (v2.10.0, v2.10.0rc1)'
required: false
type: string
default: ''
outputs:
workflow_success:
description: 'CLI tests workflow success status'
value: ${{ jobs.test-dev-commands.result == 'success' }}
schedule:
- cron: '0 2 * * *' # Runs every day at 2:00 AM UTC
permissions:
contents: read
jobs:
test-dev-commands:
env:
RELEASE_TAG: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.release_tag || inputs.release_tag }}
runs-on: ubuntu-latest
steps:
- name: Checkout code (HEAD)
if: ${{ !env.RELEASE_TAG }}
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: false
persist-credentials: false
- name: Checkout code (TAG)
if: ${{ env.RELEASE_TAG }}
uses: actions/checkout@v4
with:
ref: refs/tags/${{ env.RELEASE_TAG }}
fetch-depth: 1
submodules: false
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install Dependencies
run: |
echo $(which python)
echo $(which python3)
python3 -m pip install --upgrade pip
python3 -m pip install -e .[dev]
python3 -m pip list
- name: Install Pandoc
run: sudo apt-get update && sudo apt-get install -y pandoc
- name: Verify existing installations
run: |
python3 --version
pipx --version
#----------------------------------------------
# ----- install & configure poetry -----
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@76e04a911780d5b312d89783f7b1cd627778900a # v1.4.1
with:
version: 2.1.1
virtualenvs-create: true
virtualenvs-in-project: true
- name: Run install-dev-environment command
run: |
# Unsure if this is a valid command since it just guarantees things run on previous dependencies installation
# TODO finish debugging installation without previous installation. Tricky on GH Actions on its own.
tidy3d develop install-dev-environment
- name: Run development test commands
run: |
poetry run pytest tests/test_cli/full_test_develop.py