Skip to content

Commit eafe5a9

Browse files
chore(ci): bring back poetry cache to speed up CI jobs (langgenius#10347)
1 parent d45d90e commit eafe5a9

File tree

5 files changed

+22
-22
lines changed

5 files changed

+22
-22
lines changed

.github/workflows/api-tests.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
paths:
88
- api/**
99
- docker/**
10+
- .github/workflows/api-tests.yml
1011

1112
concurrency:
1213
group: api-tests-${{ github.head_ref || github.run_id }}
@@ -27,16 +28,15 @@ jobs:
2728
- name: Checkout code
2829
uses: actions/checkout@v4
2930

31+
- name: Install Poetry
32+
uses: abatilo/actions-poetry@v3
33+
3034
- name: Set up Python ${{ matrix.python-version }}
3135
uses: actions/setup-python@v5
3236
with:
3337
python-version: ${{ matrix.python-version }}
34-
cache-dependency-path: |
35-
api/pyproject.toml
36-
api/poetry.lock
37-
38-
- name: Install Poetry
39-
uses: abatilo/actions-poetry@v3
38+
cache: poetry
39+
cache-dependency-path: api/poetry.lock
4040

4141
- name: Check Poetry lockfile
4242
run: |
@@ -67,7 +67,7 @@ jobs:
6767
run: sh .github/workflows/expose_service_ports.sh
6868

6969
- name: Set up Sandbox
70-
uses: hoverkraft-tech/[email protected].0
70+
uses: hoverkraft-tech/[email protected].2
7171
with:
7272
compose-file: |
7373
docker/docker-compose.middleware.yaml

.github/workflows/db-migration-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
cp middleware.env.example middleware.env
4444
4545
- name: Set up Middlewares
46-
uses: hoverkraft-tech/[email protected].0
46+
uses: hoverkraft-tech/[email protected].2
4747
with:
4848
compose-file: |
4949
docker/docker-compose.middleware.yaml

.github/workflows/style.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ jobs:
2424
with:
2525
files: api/**
2626

27+
- name: Install Poetry
28+
if: steps.changed-files.outputs.any_changed == 'true'
29+
uses: abatilo/actions-poetry@v3
30+
2731
- name: Set up Python
2832
uses: actions/setup-python@v5
2933
if: steps.changed-files.outputs.any_changed == 'true'
3034
with:
3135
python-version: '3.10'
3236

33-
- name: Install Poetry
34-
if: steps.changed-files.outputs.any_changed == 'true'
35-
uses: abatilo/actions-poetry@v3
36-
3737
- name: Python dependencies
3838
if: steps.changed-files.outputs.any_changed == 'true'
3939
run: poetry install -C api --only lint

.github/workflows/vdb-tests.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ on:
77
paths:
88
- api/core/rag/datasource/**
99
- docker/**
10+
- .github/workflows/vdb-tests.yml
1011

1112
concurrency:
12-
group: api-tests-${{ github.head_ref || github.run_id }}
13+
group: vdb-tests-${{ github.head_ref || github.run_id }}
1314
cancel-in-progress: true
1415

1516
jobs:
@@ -27,16 +28,15 @@ jobs:
2728
- name: Checkout code
2829
uses: actions/checkout@v4
2930

31+
- name: Install Poetry
32+
uses: abatilo/actions-poetry@v3
33+
3034
- name: Set up Python ${{ matrix.python-version }}
3135
uses: actions/setup-python@v5
3236
with:
3337
python-version: ${{ matrix.python-version }}
34-
cache-dependency-path: |
35-
api/pyproject.toml
36-
api/poetry.lock
37-
38-
- name: Install Poetry
39-
uses: abatilo/actions-poetry@v3
38+
cache: poetry
39+
cache-dependency-path: api/poetry.lock
4040

4141
- name: Check Poetry lockfile
4242
run: |
@@ -55,7 +55,7 @@ jobs:
5555
run: sh .github/workflows/expose_service_ports.sh
5656

5757
- name: Set up Vector Stores (Weaviate, Qdrant, PGVector, Milvus, PgVecto-RS, Chroma, MyScale, ElasticSearch, Couchbase)
58-
uses: hoverkraft-tech/[email protected].0
58+
uses: hoverkraft-tech/[email protected].2
5959
with:
6060
compose-file: |
6161
docker/docker-compose.yaml

api/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@
7676
1. Install dependencies for both the backend and the test environment
7777

7878
```bash
79-
poetry install --with dev
79+
poetry install -C api --with dev
8080
```
8181

8282
2. Run the tests locally with mocked system environment variables in `tool.pytest_env` section in `pyproject.toml`
8383

8484
```bash
85-
cd ../
8685
poetry run -C api bash dev/pytest/pytest_all_tests.sh
8786
```
8887

88+

0 commit comments

Comments
 (0)