Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

chore(ci): bring back poetry cache to speed up CI jobs (#10347)

Bowen Liangeafe5a9d8f30
diff --git a/.github/workflows/api-tests.yml b/.github/workflows/api-tests.yml
index dad206181a2..eb09abe77ce 100644
--- a/.github/workflows/api-tests.yml
+++ b/.github/workflows/api-tests.yml
@@ -7,6 +7,7 @@ on:
paths:
- api/**
- docker/**
+ - .github/workflows/api-tests.yml
concurrency:
group: api-tests-${{ github.head_ref || github.run_id }}
@@ -27,16 +28,15 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
+ - name: Install Poetry
+ uses: abatilo/actions-poetry@v3
+
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- cache-dependency-path: |
- api/pyproject.toml
- api/poetry.lock
-
- - name: Install Poetry
- uses: abatilo/actions-poetry@v3
+ cache: poetry
+ cache-dependency-path: api/poetry.lock
- name: Check Poetry lockfile
run: |
@@ -67,7 +67,7 @@ jobs:
run: sh .github/workflows/expose_service_ports.sh
- name: Set up Sandbox
- uses: hoverkraft-tech/[email protected]
+ uses: hoverkraft-tech/[email protected]
with:
compose-file: |
docker/docker-compose.middleware.yaml
diff --git a/.github/workflows/db-migration-test.yml b/.github/workflows/db-migration-test.yml
index a33cdacd80f..b8246aacb34 100644
--- a/.github/workflows/db-migration-test.yml
+++ b/.github/workflows/db-migration-test.yml
@@ -43,7 +43,7 @@ jobs:
cp middleware.env.example middleware.env
- name: Set up Middlewares
- uses: hoverkraft-tech/[email protected]
+ uses: hoverkraft-tech/[email protected]
with:
compose-file: |
docker/docker-compose.middleware.yaml
diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml
index 7eb60aa51ed..01f9757b3c5 100644
--- a/.github/workflows/style.yml
+++ b/.github/workflows/style.yml
@@ -24,16 +24,16 @@ jobs:
with:
files: api/**
+ - name: Install Poetry
+ if: steps.changed-files.outputs.any_changed == 'true'
+ uses: abatilo/actions-poetry@v3
+
- name: Set up Python
uses: actions/setup-python@v5
if: steps.changed-files.outputs.any_changed == 'true'
with:
python-version: '3.10'
- - name: Install Poetry
- if: steps.changed-files.outputs.any_changed == 'true'
- uses: abatilo/actions-poetry@v3
-
- name: Python dependencies
if: steps.changed-files.outputs.any_changed == 'true'
run: poetry install -C api --only lint
diff --git a/.github/workflows/vdb-tests.yml b/.github/workflows/vdb-tests.yml
index d859fff647f..8ea38fde76e 100644
--- a/.github/workflows/vdb-tests.yml
+++ b/.github/workflows/vdb-tests.yml
@@ -7,9 +7,10 @@ on:
paths:
- api/core/rag/datasource/**
- docker/**
+ - .github/workflows/vdb-tests.yml
concurrency:
- group: api-tests-${{ github.head_ref || github.run_id }}
+ group: vdb-tests-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
@@ -27,16 +28,15 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
+ - name: Install Poetry
+ uses: abatilo/actions-poetry@v3
+
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- cache-dependency-path: |
- api/pyproject.toml
- api/poetry.lock
-
- - name: Install Poetry
- uses: abatilo/actions-poetry@v3
+ cache: poetry
+ cache-dependency-path: api/poetry.lock
- name: Check Poetry lockfile
run: |
@@ -55,7 +55,7 @@ jobs:
run: sh .github/workflows/expose_service_ports.sh
- name: Set up Vector Stores (Weaviate, Qdrant, PGVector, Milvus, PgVecto-RS, Chroma, MyScale, ElasticSearch, Couchbase)
- uses: hoverkraft-tech/[email protected]
+ uses: hoverkraft-tech/[email protected]
with:
compose-file: |
docker/docker-compose.yaml
diff --git a/api/README.md b/api/README.md
index 92cd88a6d4a..de2baee4c5b 100644
--- a/api/README.md
+++ b/api/README.md
@@ -76,13 +76,13 @@
1. Install dependencies for both the backend and the test environment
```bash
- poetry install --with dev
+ poetry install -C api --with dev
```
2. Run the tests locally with mocked system environment variables in `tool.pytest_env` section in `pyproject.toml`
```bash
- cd ../
poetry run -C api bash dev/pytest/pytest_all_tests.sh
```
+