Skip to content

Commit 30c3173

Browse files
committed
Initial draft GHA improvements
1 parent e6562d6 commit 30c3173

11 files changed

+260
-96
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: 'Build with Java & Maven'
2+
description: 'Checkout code, set up JDK, and build with Maven'
3+
inputs:
4+
skip_tests:
5+
description: 'Skip tests during Maven build'
6+
required: false
7+
default: 'true'
8+
java_distribution:
9+
description: 'JDK distribution to use'
10+
required: false
11+
default: 'adopt'
12+
java_version:
13+
description: 'JDK version to use'
14+
required: false
15+
default: '11'
16+
cache_name:
17+
description: 'Cache to be used'
18+
required: false
19+
default: 'maven'
20+
runs:
21+
using: 'composite'
22+
steps:
23+
- name: Checkout Code
24+
uses: actions/checkout@v4
25+
26+
- name: Set up JDK ${{ inputs.java_version }}
27+
uses: actions/setup-java@v4
28+
with:
29+
distribution: ${{ java_distribution }}
30+
java-version: ${{ inputs.java_version }}
31+
cache: ${{ inputs.cache_name}}
32+
33+
- name: Build with Maven
34+
run: |
35+
mvn install -Dmaven.test.skip=${{ inputs.skip_tests }}

.github/workflows/ci-astra-dev-collection.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout Code
15-
uses: actions/checkout@v2
15+
uses: actions/checkout@v4
1616
- name: Set up JDK 11
17-
uses: actions/setup-java@v2
17+
uses: actions/setup-java@v4
1818
with:
1919
distribution: 'adopt'
2020
java-version: 11
21+
cache: 'maven'
2122
- name: Build with Maven
2223
run: |
2324
mvn install -Dmaven.test.skip=true
@@ -26,12 +27,13 @@ jobs:
2627
runs-on: ubuntu-latest
2728
steps:
2829
- name: Checkout repository
29-
uses: actions/checkout@v2
30+
uses: actions/checkout@v4
3031
- name: Set up JDK
31-
uses: actions/setup-java@v2
32+
uses: actions/setup-java@v4
3233
with:
3334
distribution: 'adopt'
3435
java-version: 11
36+
cache: 'maven'
3537
- name: Maven Test
3638
env:
3739
ASTRA_DB_APPLICATION_TOKEN_DEV: ${{ secrets.ASTRA_DB_APPLICATION_TOKEN_DEV }}
@@ -46,12 +48,13 @@ jobs:
4648
runs-on: ubuntu-latest
4749
steps:
4850
- name: Checkout repository
49-
uses: actions/checkout@v2
51+
uses: actions/checkout@v4
5052
- name: Set up JDK
51-
uses: actions/setup-java@v2
53+
uses: actions/setup-java@v4
5254
with:
5355
distribution: 'adopt'
5456
java-version: 11
57+
cache: 'maven'
5558
- name: Run test for DEV
5659
env:
5760
ASTRA_DB_APPLICATION_TOKEN_DEV: ${{ secrets.ASTRA_DB_APPLICATION_TOKEN_DEV }}
@@ -66,12 +69,13 @@ jobs:
6669
runs-on: ubuntu-latest
6770
steps:
6871
- name: Checkout repository
69-
uses: actions/checkout@v2
72+
uses: actions/checkout@v4
7073
- name: Set up JDK
71-
uses: actions/setup-java@v2
74+
uses: actions/setup-java@v4
7275
with:
7376
distribution: 'adopt'
7477
java-version: 11
78+
cache: 'maven'
7579

7680
- name: Run test for DEV
7781
env:

.github/workflows/ci-astra-dev-database.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout Code
15-
uses: actions/checkout@v2
15+
uses: actions/checkout@v4
1616
- name: Set up JDK 11
17-
uses: actions/setup-java@v2
17+
uses: actions/setup-java@v4
1818
with:
1919
distribution: 'adopt'
2020
java-version: 11
21+
cache: 'maven'
2122
- name: Build with Maven
2223
run: |
2324
mvn install -Dmaven.test.skip=true
@@ -26,12 +27,13 @@ jobs:
2627
runs-on: ubuntu-latest
2728
steps:
2829
- name: Checkout repository
29-
uses: actions/checkout@v2
30+
uses: actions/checkout@v4
3031
- name: Set up JDK
31-
uses: actions/setup-java@v2
32+
uses: actions/setup-java@v4
3233
with:
3334
distribution: 'adopt'
3435
java-version: 11
36+
cache: 'maven'
3537
- name: Maven Test
3638
env:
3739
ASTRA_DB_APPLICATION_TOKEN_DEV: ${{ secrets.ASTRA_DB_APPLICATION_TOKEN_DEV }}
@@ -46,12 +48,13 @@ jobs:
4648
runs-on: ubuntu-latest
4749
steps:
4850
- name: Checkout repository
49-
uses: actions/checkout@v2
51+
uses: actions/checkout@v4
5052
- name: Set up JDK
51-
uses: actions/setup-java@v2
53+
uses: actions/setup-java@v4
5254
with:
5355
distribution: 'adopt'
5456
java-version: 11
57+
cache: 'maven'
5558
- name: Run test for DEV
5659
env:
5760
ASTRA_DB_APPLICATION_TOKEN_DEV: ${{ secrets.ASTRA_DB_APPLICATION_TOKEN_DEV }}
@@ -66,12 +69,13 @@ jobs:
6669
runs-on: ubuntu-latest
6770
steps:
6871
- name: Checkout repository
69-
uses: actions/checkout@v2
72+
uses: actions/checkout@v4
7073
- name: Set up JDK
71-
uses: actions/setup-java@v2
74+
uses: actions/setup-java@v4
7275
with:
7376
distribution: 'adopt'
7477
java-version: 11
78+
cache: 'maven'
7579

7680
- name: Run test for DEV
7781
env:

.github/workflows/ci-astra-dev-databaseadmin.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout Code
15-
uses: actions/checkout@v2
15+
uses: actions/checkout@v4
1616
- name: Set up JDK 11
17-
uses: actions/setup-java@v2
17+
uses: actions/setup-java@v4
1818
with:
1919
distribution: 'adopt'
2020
java-version: 11
21+
cache: 'maven'
2122
- name: Build with Maven
2223
run: |
2324
mvn install -Dmaven.test.skip=true
@@ -26,12 +27,13 @@ jobs:
2627
runs-on: ubuntu-latest
2728
steps:
2829
- name: Checkout repository
29-
uses: actions/checkout@v2
30+
uses: actions/checkout@v4
3031
- name: Set up JDK
31-
uses: actions/setup-java@v2
32+
uses: actions/setup-java@v4
3233
with:
3334
distribution: 'adopt'
3435
java-version: 11
36+
cache: 'maven'
3537
- name: Maven Test
3638
env:
3739
ASTRA_DB_APPLICATION_TOKEN_DEV: ${{ secrets.ASTRA_DB_APPLICATION_TOKEN_DEV }}
@@ -46,12 +48,13 @@ jobs:
4648
runs-on: ubuntu-latest
4749
steps:
4850
- name: Checkout repository
49-
uses: actions/checkout@v2
51+
uses: actions/checkout@v4
5052
- name: Set up JDK
51-
uses: actions/setup-java@v2
53+
uses: actions/setup-java@v4
5254
with:
5355
distribution: 'adopt'
5456
java-version: 11
57+
cache: 'maven'
5558
- name: Run test for DEV
5659
env:
5760
ASTRA_DB_APPLICATION_TOKEN_DEV: ${{ secrets.ASTRA_DB_APPLICATION_TOKEN_DEV }}
@@ -66,12 +69,13 @@ jobs:
6669
runs-on: ubuntu-latest
6770
steps:
6871
- name: Checkout repository
69-
uses: actions/checkout@v2
72+
uses: actions/checkout@v4
7073
- name: Set up JDK
71-
uses: actions/setup-java@v2
74+
uses: actions/setup-java@v4
7275
with:
7376
distribution: 'adopt'
7477
java-version: 11
78+
cache: 'maven'
7579

7680
- name: Run test for DEV
7781
env:

.github/workflows/ci-astra-dev-devops.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout Code
15-
uses: actions/checkout@v2
15+
uses: actions/checkout@v4
1616
- name: Set up JDK 11
17-
uses: actions/setup-java@v2
17+
uses: actions/setup-java@v4
1818
with:
1919
distribution: 'adopt'
2020
java-version: 11
21+
cache: 'maven'
2122
- name: Build with Maven
2223
run: |
2324
mvn install -Dmaven.test.skip=true
@@ -26,12 +27,13 @@ jobs:
2627
runs-on: ubuntu-latest
2728
steps:
2829
- name: Checkout repository
29-
uses: actions/checkout@v2
30+
uses: actions/checkout@v4
3031
- name: Set up JDK
31-
uses: actions/setup-java@v2
32+
uses: actions/setup-java@v4
3233
with:
3334
distribution: 'adopt'
3435
java-version: 11
36+
cache: 'maven'
3537
- name: Maven Test
3638
env:
3739
ASTRA_DB_APPLICATION_TOKEN_DEV: ${{ secrets.ASTRA_DB_APPLICATION_TOKEN_DEV }}
@@ -46,12 +48,13 @@ jobs:
4648
runs-on: ubuntu-latest
4749
steps:
4850
- name: Checkout repository
49-
uses: actions/checkout@v2
51+
uses: actions/checkout@v4
5052
- name: Set up JDK
51-
uses: actions/setup-java@v2
53+
uses: actions/setup-java@v4
5254
with:
5355
distribution: 'adopt'
5456
java-version: 11
57+
cache: 'maven'
5558
- name: Run test for DEV
5659
env:
5760
ASTRA_DB_APPLICATION_TOKEN_DEV: ${{ secrets.ASTRA_DB_APPLICATION_TOKEN_DEV }}
@@ -66,12 +69,13 @@ jobs:
6669
runs-on: ubuntu-latest
6770
steps:
6871
- name: Checkout repository
69-
uses: actions/checkout@v2
72+
uses: actions/checkout@v4
7073
- name: Set up JDK
71-
uses: actions/setup-java@v2
74+
uses: actions/setup-java@v4
7275
with:
7376
distribution: 'adopt'
7477
java-version: 11
78+
cache: 'maven'
7579

7680
- name: Run test for DEV
7781
env:
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: AstraDev NEW
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
setup:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout & Build
11+
uses: ./.github/actions/build-with-maven
12+
13+
run_dev_tests:
14+
needs: setup
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
include:
19+
- cloud_provider: AWS
20+
cloud_region: us-west-2
21+
- cloud_provider: GCP
22+
cloud_region: europe-west4
23+
# - cloud_provider: GCP
24+
# cloud_region: us-central1
25+
steps:
26+
- name: Checkout & Build
27+
uses: ./.github/actions/build-with-maven
28+
29+
- name: Run Maven Tests
30+
env:
31+
ASTRA_DB_APPLICATION_TOKEN_DEV: ${{ secrets.ASTRA_DB_APPLICATION_TOKEN_DEV }}
32+
ASTRA_CLOUD_PROVIDER_DEV: ${{ matrix.cloud_provider }}
33+
ASTRA_CLOUD_REGION_DEV: ${{ matrix.cloud_region }}
34+
run: |
35+
cd astra-db-java
36+
mvn test -Dtest=com.datastax.astra.test.integration.dev.*Test
37+
38+
run_vectorize_tests:
39+
needs: setup
40+
runs-on: ubuntu-latest
41+
strategy:
42+
matrix:
43+
include:
44+
- cloud_provider: AWS
45+
cloud_region: us-west-2
46+
- cloud_provider: GCP
47+
cloud_region: europe-west4
48+
embedding_provider:
49+
- { name: openai, key: ${{ secrets.OPENAI_API_KEY }} }
50+
- { name: azureOpenAI, key: ${{ secrets.AZURE_OPENAI_API_KEY }} }
51+
- { name: huggingface, key: ${{ secrets.HF_API_KEY }} }
52+
- { name: mistral, key: ${{ secrets.MISTRAL_API_KEY }} }
53+
- { name: voyageAI, key: ${{ secrets.VOYAGE_API_KEY }} }
54+
- { name: upstageAI, key: ${{ secrets.UPSTAGE_API_KEY }} }
55+
- { name: jinaAI, key: ${{ secrets.JINA_API_KEY }} }
56+
- { name: nvidia, key: 'nvidia' } # Not used
57+
58+
steps:
59+
- name: Checkout & Build
60+
uses: ./.github/actions/build-with-maven
61+
62+
- name: Run Maven Tests
63+
env:
64+
ASTRA_DB_APPLICATION_TOKEN_DEV: ${{ secrets.ASTRA_DB_APPLICATION_TOKEN_DEV }}
65+
ASTRA_CLOUD_PROVIDER_DEV: ${{ matrix.cloud_provider }}
66+
ASTRA_CLOUD_REGION_DEV: ${{ matrix.cloud_region }}
67+
EMBEDDING_PROVIDER: ${{ matrix.embedding_provider.name }}
68+
EMBEDDING_API_KEY: ${{ matrix.embedding_provider.key }}
69+
run: |
70+
cd astra-db-java
71+
mvn test -Dtest=com.datastax.astra.test.integration.dev_vectorize.AstraDevVectorizeEmbeddingApiKeyITTest

0 commit comments

Comments
 (0)