-
Notifications
You must be signed in to change notification settings - Fork 3
94 lines (89 loc) · 3.1 KB
/
ci-astra-col-db-dbadmin.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Astra | Collection/DB/DBAdmin Integration Tests
on:
#push:
# branches: [ main ]
#pull_request:
# branches: [ main ]
workflow_dispatch:
inputs:
java_distribution:
description: 'JDK distribution to use'
required: true
default: 'adopt'
type: choice
options: ['adopt', 'temurin']
java_version:
description: 'JDK version to use'
required: true
default: '17.0'
cache_pkg_mgr_name:
description: 'Cache package manager to be used'
required: true
default: 'maven'
skip_tests_on_build:
description: 'Skip tests during Maven build'
required: false
default: 'true'
test_to_run:
description: 'Test to run'
required: true
default: 'AstraDevCollectionITTest'
type: choice
options:
- 'AstraDevCollectionITTest'
- 'AstraDevDatabaseITTest'
- 'AstraDevDatabaseAdminITTest'
- 'AstraProdCollectionITTest'
- 'AstraProdDatabaseITTest'
- 'AstraProdDatabaseAdminITTest'
jobs:
BUILD:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout & Build
uses: ./.github/actions/checkout-and-build
run_dev_tests:
needs: BUILD
runs-on: ubuntu-latest
strategy:
matrix:
# We had to do it this way because same regions aren't testing in various Astra envs.
include:
- cloud_provider: 'AWS'
cloud_region: 'us-west-2'
astra_environment: 'DEV'
- cloud_provider: 'GCP'
cloud_region: 'europe-west4'
astra_environment: 'DEV'
- cloud_provider: 'GCP'
cloud_region: 'us-central1'
astra_environment: 'DEV'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: ${{ inputs.java_distribution }}
java-version: ${{ inputs.java_version }}
cache: ${{ inputs.cache_pkg_mgr_name }}
- name: "Maven Test on ${{ matrix.cloud_provider }} - ${{ matrix.cloud_region }} [Astra DEV]"
if: ${{ matrix.astra_environment == 'DEV' }}
env:
ASTRA_DB_APPLICATION_TOKEN_DEV: ${{ secrets.ASTRA_DB_APPLICATION_TOKEN_DEV }}
ASTRA_CLOUD_PROVIDER_DEV: ${{ matrix.cloud_provider }}
ASTRA_CLOUD_REGION_DEV: ${{ matrix.cloud_region }}
run: |
cd astra-db-java
mvn test -Dtest=com.datastax.astra.test.integration.dev.${{ inputs.test_to_run }}
- name: "Maven Test on ${{ matrix.cloud_provider }} - ${{ matrix.cloud_region }} [Astra PROD]"
if: ${{ matrix.astra_environment == 'PROD' }}
env:
ASTRA_DB_APPLICATION_TOKEN: ${{ secrets.ASTRA_DB_APPLICATION_TOKEN }}
ASTRA_CLOUD_PROVIDER: ${{ matrix.cloud_provider }}
ASTRA_CLOUD_REGION: ${{ matrix.cloud_region }}
run: |
cd astra-db-java
mvn test -Dtest=com.datastax.astra.test.integration.prod.${{ inputs.test_to_run }}