-
Notifications
You must be signed in to change notification settings - Fork 899
56 lines (52 loc) · 1.85 KB
/
promptflow-import-linter.yml
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
name: promptflow-import-linter
on:
pull_request:
paths:
- src/promptflow-tracing/**
- src/promptflow-core/**
- src/promptflow-devkit/**
- src/promptflow-azure/**
- .github/workflows/promptflow-import-linter.yml
workflow_dispatch:
env:
WORKING_DIRECTORY: ${{ github.workspace }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.11
- uses: snok/install-poetry@v1
- name: Install all packages
run: |
cd ${{ env.WORKING_DIRECTORY }}/src/promptflow-tracing
touch promptflow/__init__.py
poetry install --with dev
cd ${{ env.WORKING_DIRECTORY }}/src/promptflow-core
touch promptflow/__init__.py
poetry install --with dev
cd ${{ env.WORKING_DIRECTORY }}/src/promptflow-devkit
touch promptflow/__init__.py
poetry install --with dev
cd ${{ env.WORKING_DIRECTORY }}/src/promptflow-azure
touch promptflow/__init__.py
poetry install --with dev
working-directory: ${{ env.WORKING_DIRECTORY }}
- name: import lint
run: |
echo "=== Running import lint in promptflow-tracing ==="
cd ${{ env.WORKING_DIRECTORY }}/src/promptflow-tracing
poetry run lint-imports
echo "=== Running import lint in promptflow-core ==="
cd ${{ env.WORKING_DIRECTORY }}/src/promptflow-core
poetry run lint-imports
echo "=== Running import lint in promptflow-devkit ==="
cd ${{ env.WORKING_DIRECTORY }}/src/promptflow-devkit
poetry run lint-imports
echo "=== Running import lint in promptflow-azure ==="
cd ${{ env.WORKING_DIRECTORY }}/src/promptflow-azure
poetry run lint-imports
working-directory: ${{ env.WORKING_DIRECTORY }}