Skip to content

Commit 10f76db

Browse files
committed
Fix workflow
1 parent cd9a422 commit 10f76db

File tree

2 files changed

+90
-121
lines changed

2 files changed

+90
-121
lines changed

.github/workflows/cloud-storage-adapter-check.yaml

Lines changed: 0 additions & 121 deletions
This file was deleted.

.github/workflows/object-storage-adapter-check.yaml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ env:
4444
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_ACCESS_KEY }}
4545
S3_REGION: us-east-1
4646
S3_BUCKET_BASE_NAME: s3-scalardb-test-bucket
47+
CLOUD_STORAGE_PROJECT_ID: ${{ secrets.CLOUD_STORAGE_PROJECT_ID }}
48+
CLOUD_STORAGE_SERVICE_ACCOUNT_KEY: ${{ secrets.CLOUD_STORAGE_SERVICE_ACCOUNT_KEY }}
49+
CLOUD_STORAGE_BUCKET_BASE_NAME: scalardb-test-bucket
4750

4851
jobs:
4952
integration-test-s3:
@@ -132,3 +135,90 @@ jobs:
132135
with:
133136
name: s3_integration_test_reports_${{ matrix.test_group.label }}
134137
path: core/build/reports/tests/integrationTestObjectStorage
138+
139+
integration-test-cloud-storage:
140+
name: Cloud Storage integration test (${{ matrix.test_group.label }})
141+
runs-on: ubuntu-latest
142+
143+
strategy:
144+
fail-fast: false
145+
matrix:
146+
test_group:
147+
- label: consensus_commit_default
148+
tests_filter: '--tests "**.ConsensusCommit**"'
149+
bucket_suffix: consensus-commit
150+
group_commit_enabled: false
151+
- label: consensus_commit_with_group_commit
152+
tests_filter: '--tests "**.ConsensusCommit**"'
153+
bucket_suffix: consensus-commit-gc
154+
group_commit_enabled: true
155+
- label: storage_scan
156+
tests_filter: '--tests "**.ObjectStorageSingle**" --tests "**.ObjectStorageMultiple**"'
157+
bucket_suffix: storage-scan
158+
group_commit_enabled: false
159+
- label: storage_wrapper
160+
tests_filter: '--tests "**.ObjectStorageWrapper**"'
161+
bucket_suffix: storage-wrapper
162+
group_commit_enabled: false
163+
- label: storage_admin
164+
tests_filter: '--tests "**.ObjectStorageAdmin**"'
165+
bucket_suffix: storage-admin
166+
group_commit_enabled: false
167+
- label: storage_cm
168+
tests_filter: '--tests "**.ObjectStorageConditionalMutation**"'
169+
bucket_suffix: storage-cm
170+
group_commit_enabled: false
171+
- label: storage_others
172+
tests_filter: '--tests "**.ObjectStorage**" --tests "!**.ObjectStorageSingle**" --tests "!**.ObjectStorageMultiple**" --tests "!**.ObjectStorageWrapper**" --tests "!**.ObjectStorageAdmin**" --tests "!**.ObjectStorageConditionalMutation**"'
173+
bucket_suffix: storage
174+
group_commit_enabled: false
175+
- label: two_phase_consensus_commit
176+
tests_filter: '--tests "**.TwoPhaseConsensusCommit**"'
177+
bucket_suffix: 2pcc
178+
group_commit_enabled: false
179+
- label: single_crud_operation_transaction
180+
tests_filter: '--tests "**.SingleCrudOperationTransaction**"'
181+
bucket_suffix: single-crud
182+
group_commit_enabled: false
183+
184+
steps:
185+
- uses: actions/checkout@v5
186+
187+
- name: Set up JDK ${{ env.JAVA_VERSION }} (${{ env.JAVA_VENDOR }})
188+
uses: actions/setup-java@v5
189+
with:
190+
java-version: ${{ env.JAVA_VERSION }}
191+
distribution: ${{ env.JAVA_VENDOR }}
192+
193+
- name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}) to run integration test
194+
uses: actions/setup-java@v5
195+
if: ${{ env.SET_UP_INT_TEST_RUNTIME_NON_ORACLE_JDK == 'true'}}
196+
with:
197+
java-version: ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}
198+
distribution: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}
199+
200+
- name: Login to Oracle container registry
201+
uses: docker/login-action@v3
202+
if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }}
203+
with:
204+
registry: container-registry.oracle.com
205+
username: ${{ secrets.OCR_USERNAME }}
206+
password: ${{ secrets.OCR_TOKEN }}
207+
208+
- name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (oracle) to run the integration test
209+
if: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR == 'oracle' }}
210+
run: |
211+
container_id=$(docker create "container-registry.oracle.com/java/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}")
212+
docker cp -L "$container_id:/usr/java/default" /usr/lib/jvm/oracle-jdk && docker rm "$container_id"
213+
- name: Setup Gradle
214+
uses: gradle/actions/setup-gradle@v5
215+
216+
- name: Execute Gradle 'integrationTestObjectStorage' task
217+
run: ./gradlew integrationTestObjectStorage -Dscalardb.object_storage.storage=cloud-storage -Dscalardb.object_storage.endpoint=${{ env.CLOUD_STORAGE_BUCKET_BASE_NAME }}-${{ matrix.test_group.bucket_suffix }} -Dscalardb.object_storage.username='${{ env.CLOUD_STORAGE_PROJECT_ID }}' -Dscalardb.object_storage.password='${{ env.CLOUD_STORAGE_SERVICE_ACCOUNT_KEY }}' ${{ matrix.test_group.group_commit_enabled && env.INT_TEST_GRADLE_OPTIONS_FOR_GROUP_COMMIT || '' }} ${{ matrix.test_group.tests_filter }}
218+
219+
- name: Upload Gradle test reports
220+
if: always()
221+
uses: actions/upload-artifact@v5
222+
with:
223+
name: cloud_storage_integration_test_reports_${{ matrix.test_group.label }}
224+
path: core/build/reports/tests/integrationTestObjectStorage

0 commit comments

Comments
 (0)