Skip to content

test-develop-cli

test-develop-cli #2602

name: "test-develop-cli"
on:
workflow_dispatch:
workflow_run:
workflows: [ "tidy3d-frontend-tests" ]
types: [ completed ]
jobs:
on-success:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- run: echo 'The triggering workflow passed'
on-failure:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- run: echo 'The triggering workflow failed'
test-dev-commands:
needs: [on-success]
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_commit.id }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- 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: Ubuntu install Pandoc
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install pandoc
- name: MacOS install Pandoc
if: matrix.os == 'macos-latest'
run: brew install pandoc
- name: Windows install Pandoc
if: matrix.os == 'windows-latest'
run: choco install pandoc
- name: Verify existing installations
run: |
python3 --version
pipx --version
#----------------------------------------------
# ----- install & configure poetry -----
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.8.2
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