Skip to content

Commit fbb744f

Browse files
authored
ci: improve astra usage and cleanups (#319)
1 parent e47a143 commit fbb744f

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

.github/workflows/ci-e2e-tests.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ name: CI - E2E tests
22
on:
33
workflow_dispatch: {}
44
schedule:
5-
# astra dev and dse - every 2 hours
6-
- cron: "0 */2 * * *"
5+
# keep different crons to reduce the n. of databases at the same time on astra
6+
- cron: "0 0/4 * * *"
7+
- cron: "0 1/4 * * *"
8+
- cron: "0 2/4 * * *"
9+
- cron: "0 3/4 * * *"
710
pull_request:
811
paths-ignore:
912
- "scripts/**"
@@ -29,6 +32,10 @@ jobs:
2932
astradb-prod-region: "us-east-1"
3033
astradb-prod-cloud: "aws"
3134
is-scheduled: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
35+
is-ragstack-dev-cron: ${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.event.schedule == '0 0/4 * * *') }}
36+
is-ragstack-latest-release-cron: ${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.event.schedule == '0 1/4 * * *') }}
37+
is-langchain-dev-cron: ${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.event.schedule == '0 2/4 * * *') }}
38+
is-llamaindex-dev-cron: ${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'schedule' && github.event.schedule == '0 3/4 * * *') }}
3239
steps:
3340
- uses: actions/checkout@v4
3441
- name: Run lint
@@ -56,7 +63,7 @@ jobs:
5663
ragstack-dev-astradev-tests:
5764
name: "RAGStack dev / AstraDB dev"
5865
needs: ["preconditions"]
59-
if: ${{ needs.preconditions.outputs.is-scheduled == 'true' || needs.preconditions.outputs.e2e_tests == 'true' }}
66+
if: ${{ needs.preconditions.outputs.is-ragstack-dev-cron == 'true' || needs.preconditions.outputs.e2e_tests == 'true' }}
6067
uses: ./.github/workflows/_run_e2e_tests.yml
6168
secrets: inherit
6269
with:
@@ -90,7 +97,7 @@ jobs:
9097
langchain-astradev-tests:
9198
name: "LangChain dev / AstraDB dev"
9299
needs: ["preconditions"]
93-
if: ${{ needs.preconditions.outputs.is-scheduled == 'true' }}
100+
if: ${{ needs.preconditions.outputs.is-langchain-dev-cron == 'true' }}
94101
uses: ./.github/workflows/_run_e2e_tests.yml
95102
secrets: inherit
96103
with:
@@ -124,7 +131,7 @@ jobs:
124131
llamaindex-astradev-tests:
125132
name: "LLamaIndex dev / AstraDB dev"
126133
needs: ["preconditions"]
127-
if: ${{ needs.preconditions.outputs.is-scheduled == 'true' }}
134+
if: ${{ needs.preconditions.outputs.is-llamaindex-dev-cron == 'true' }}
128135
uses: ./.github/workflows/_run_e2e_tests.yml
129136
secrets: inherit
130137
with:
@@ -158,7 +165,7 @@ jobs:
158165
ragstack-latest-release-astradev-tests:
159166
name: "RAGStack latest / AstraDB dev"
160167
needs: ["preconditions"]
161-
if: ${{ needs.preconditions.outputs.is-scheduled == 'true' }}
168+
if: ${{ needs.preconditions.outputs.is-ragstack-latest-release-cron == 'true' }}
162169
uses: ./.github/workflows/_run_e2e_tests.yml
163170
secrets: inherit
164171
with:

.github/workflows/clean-astra-env.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Clean Astra env
33
on:
44
workflow_dispatch: {}
55
schedule:
6-
- cron: "*/30 * * * *"
6+
- cron: "*/5 * * * *"
77

88
jobs:
99
e2e-tests:
@@ -13,9 +13,9 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
include:
16-
# - name: Astra PROD
17-
# astra_token_secret: E2E_TESTS_ASTRA_PROD_DB_TOKEN
18-
# env: PROD
16+
- name: Astra PROD
17+
astra_token_secret: E2E_TESTS_ASTRA_PROD_DB_TOKEN
18+
env: PROD
1919
- name: Astra DEV
2020
astra_token_secret: E2E_TESTS_ASTRA_DEV_DB_TOKEN
2121
env: DEV

0 commit comments

Comments
 (0)