-
Notifications
You must be signed in to change notification settings - Fork 319
114 lines (111 loc) · 3.52 KB
/
NativeTests.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: NativeTests
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
paths-ignore:
- 'spring-cloud-generator/**'
- 'spring-cloud-previews/**'
workflow_dispatch:
env:
EXCLUDED_MODULES: spring-cloud-spanner-spring-data-r2dbc
jobs:
parallel-NativeTests:
if: |
github.actor != 'dependabot[bot]' && ((
github.event_name == 'pull_request' && github.repository == github.event.pull_request.head.repo.full_name
) || (github.event_name != 'pull_request'))
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
it:
- alloydb-sample
- bigquery-sample
- bigquery
- core
- data-firestore
- data-firestore-sample
- datastore
- datastore-basic-sample
- kms
- kms-sample
- logging-sample
- metrics-sample
- pubsub-sample
- pubsub-bus-sample
- pubsub-integration-sample
#- pubsub-stream-sample ## https://github.com/GoogleCloudPlatform/spring-cloud-gcp/issues/2456
- secretmanager
- secretmanager-sample
- spanner
- sql-mysql-sample
- sql-postgres-sample
- starter-firestore-sample
- storage
- storage-sample
- trace-sample
- vision
- vision-sample
steps:
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d' --utc)" >> $GITHUB_OUTPUT
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
- name: Set Up Authentication
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.SPRING_CLOUD_GCP_CI_NATIVE_SA_KEY }}
- name: Setup gcloud
uses: google-github-actions/setup-gcloud@v1
with:
project_id: spring-cloud-gcp-ci-native
- name: Mvn install # Need this when the directory/pom structure changes
id: install
run: |
./mvnw \
--batch-mode \
--no-transfer-progress \
--threads 1.5C \
--define maven.test.skip=true \
--define maven.javadoc.skip=true \
install
- uses: graalvm/setup-graalvm@v1
with:
java-version: '21'
distribution: 'graalvm-community'
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'
- name: Setup env for test
run: echo "SPRING_CLOUD_GCP_CI_NATIVE_SA_KEY_BASE64=$(echo -n $SA_KEY | base64 -w 0)" >> "$GITHUB_ENV"
env:
SA_KEY: ${{ secrets.SPRING_CLOUD_GCP_CI_NATIVE_SA_KEY }}
- name: Native Tests in Modules
id: intTest
env:
DB_PASSWORD: ${{ secrets.SPRING_CLOUD_GCP_CI_NATIVE_DB_ROOT_PASSWORD }}
run: MODULE_UNDER_TEST="${{ matrix.it }}" ./.github/workflows/scripts/native-image-tests.sh
- name: Aggregate Report
run: |
./mvnw \
--batch-mode \
--no-transfer-progress \
--define aggregate=true \
--activate-profiles spring-native,\!default \
surefire-report:report-only
- name: Archive logs
if: always()
continue-on-error: true
uses: actions/upload-artifact@v3
with:
name: Native Test Logs
path: |
**/target/failsafe-reports/*
**/target/site