Skip to content

Commit 2cb076c

Browse files
committed
start overhauling ci
1 parent 0cd1cce commit 2cb076c

18 files changed

Lines changed: 190 additions & 14 deletions

.github/workflows/ci-docs-compile-tests.yml renamed to .github/workflows/_docs-compile-tests.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name: Compile against documentation examples
33
on:
44
workflow_call:
55
workflow_dispatch:
6-
pull_request: # temporary until it's merged
7-
branches: [ KG-ci-additions ]
8-
push:
9-
branches: [ KG-ci-additions ]
6+
# pull_request: # temporary until it's merged
7+
# branches: [ KG-ci-additions ]
8+
# push:
9+
# branches: [ KG-ci-additions ]
1010

1111
jobs:
1212
test-compilation:
@@ -15,18 +15,12 @@ jobs:
1515
- name: Checkout repository
1616
uses: actions/checkout@v6
1717

18-
- name: Install maven
19-
shell: bash
20-
run: |
21-
sudo apt update
22-
sudo apt install maven -y
23-
2418
- name: Set up JDK 17
2519
uses: actions/setup-java@v5
2620
with:
27-
distribution: adopt
28-
java-version: 21
29-
cache: maven
21+
java-version: 17
22+
distribution: 'temurin'
23+
cache: 'maven'
3024

3125
- name: Build with Maven
3226
shell: bash
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Run integration tests against HCD
2+
3+
on:
4+
workflow_call:
5+
workflow_dispatch:
6+
pull_request: # temporary until it's merged
7+
branches: [ KG-ci-additions ]
8+
push:
9+
branches: [ KG-ci-additions ]
10+
11+
permissions:
12+
id-token: write
13+
14+
jobs:
15+
test-integration-hcd:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v6
20+
21+
- name: Setup Java 17
22+
uses: actions/setup-java@v5
23+
with:
24+
java-version: '17'
25+
distribution: 'temurin'
26+
cache: 'maven'
27+
28+
- name: Configure AWS credentials from OIDC
29+
uses: aws-actions/configure-aws-credentials@v4
30+
with:
31+
role-to-assume: arn:aws:iam::559669398656:role/astra-db-java-ecr-ro-user
32+
aws-region: us-west-2
33+
34+
- name: Login to Amazon ECR
35+
uses: aws-actions/amazon-ecr-login@v2
36+
37+
- name: Start HCD and Data API
38+
run: docker-compose -f docker-compose-hcd.yml up -d --wait
39+
working-directory: ${{ github.workspace }}/astra-db-java/src/test/resources
40+
41+
- name: Run integration tests
42+
run: mvn clean verify -pl astra-db-java -Plocal

‎.github/workflows/_unit-tests.yml‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Run unit tests
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
java_versions:
7+
type: string
8+
description: 'Comma-separated list of Java versions e.g. "17","21"'
9+
required: true
10+
workflow_dispatch:
11+
inputs:
12+
java_versions:
13+
description: 'Comma-separated list of Java versions e.g. "17","21"'
14+
default: '"17"'
15+
required: false
16+
17+
jobs:
18+
unit-tests:
19+
runs-on: ubuntu-latest
20+
strategy:
21+
matrix:
22+
java-version: ${{ fromJSON(format('[{0}]', inputs.java_versions || '"17"')) }}
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v6
26+
27+
- name: Set up JDK ${{ matrix.java-version }}
28+
uses: actions/setup-java@v5
29+
with:
30+
java-version: ${{ matrix.java-version }}
31+
distribution: 'temurin'
32+
cache: 'maven'
33+
34+
- name: Run unit tests
35+
run: mvn clean test -Dtest='!**/*IT' -Dtest.skipped=false -pl astra-db-java -B
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

.github/workflows/ci-astra-dev-vectorize-aws-bedrock.yml renamed to .github/workflows/legacy/ci-astra-dev-vectorize-aws-bedrock.yml

File renamed without changes.

0 commit comments

Comments
 (0)