-
Notifications
You must be signed in to change notification settings - Fork 44
84 lines (69 loc) · 2.27 KB
/
test_develop_cli.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
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