forked from airbytehq/airbyte
-
Notifications
You must be signed in to change notification settings - Fork 0
131 lines (121 loc) · 4.36 KB
/
Copy pathjava-cdk-tests.yml
File metadata and controls
131 lines (121 loc) · 4.36 KB
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: Java CDK Tests
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ secrets.SELF_RUNNER_AWS_ACCESS_KEY_ID }}
S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }}
on:
workflow_dispatch:
push:
branches:
- master
pull_request:
types:
- opened
- reopened
- synchronize
jobs:
changes:
name: Detect Changes
runs-on: ubuntu-24.04
outputs:
java: ${{ steps.changes.outputs.java }}
steps:
- name: Checkout Airbyte
if: github.event_name != 'pull_request'
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- id: changes
uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
with:
filters: |
java:
- 'airbyte-cdk/java/**/*'
- 'airbyte-cdk/bulk/**/*'
# Check for changes in the actual artifact that we'll publish.
# Notably, this does _not_ include test/integrationTest.
changes-in-bulk-artifact:
name: Detect Changes in Bulk CDK artifact
runs-on: ubuntu-24.04
outputs:
java: ${{ steps.changes-in-bulk-artifact.outputs.java }}
steps:
- name: Checkout Airbyte
if: github.event_name != 'pull_request'
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- id: changes-in-bulk-artifact
uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
with:
filters: |
java:
- 'airbyte-cdk/bulk/**/**/src/main/**/*'
- 'airbyte-cdk/bulk/**/**/src/testFixtures/**/*'
run-check-bulk-cdk-version:
needs:
- changes-in-bulk-artifact
if: needs.changes-in-bulk-artifact.outputs.java == 'true'
runs-on: linux-24.04-large # Custom runner, defined in GitHub org settings
name: Bulk CDK version check
timeout-minutes: 60
steps:
- name: Checkout Airbyte
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- name: Java Setup
uses: actions/setup-java@17f84c3641ba7b8f6deff6309fc4c864478f5d62 # v3.14.1
with:
distribution: "zulu"
java-version: "21"
# Help CDK Devs understand CDK version should be incremented on changes.
- name: Check that bulk CDK version is incremented
uses: burrunan/gradle-cache-action@3bf23b8dd95e7d2bacf2470132454fe893a178a1 # v1
env:
CI: true
with:
job-id: bulk-cdk-version-check
concurrent: true
gradle-distribution-sha-256-sum-warning: false
arguments: --scan :airbyte-cdk:bulk:checkBuildNumber
run-check:
needs:
- changes
if: needs.changes.outputs.java == 'true'
# As of now, 16 cores seems to be enough.
# Any revision upwards should be based on a performance analysis of gradle scans.
# See https://github.com/airbytehq/airbyte/pull/36055 for an example of this,
# which explains why which we went down from 64 cores to 16.
runs-on: linux-24.04-large # Custom runner, defined in GitHub org settings
name: CDK Check
timeout-minutes: 60
steps:
- name: Checkout Airbyte
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- name: Java Setup
uses: actions/setup-java@17f84c3641ba7b8f6deff6309fc4c864478f5d62 # v3.14.1
with:
distribution: "zulu"
java-version: "21"
- name: Run Java CDK Tests
uses: burrunan/gradle-cache-action@663fbad34e03c8f12b27f4999ac46e3d90f87eca # v3.0.1
env:
CI: true
with:
job-id: gradle-check
read-only: ${{ github.ref != 'refs/heads/master' }}
gradle-distribution-sha-256-sum-warning: false
concurrent: true
# TODO: be able to remove the skipSlowTests property
arguments: --scan :airbyte-cdk:check -DskipSlowTests=true
bulk-cdk-version-check-result:
name: Bulk CDK version check result
runs-on: ubuntu-24.04
if: always()
needs:
- run-check-bulk-cdk-version
steps:
- name: Report status
run: |
if [[ "${{ needs.run-check-bulk-cdk-version.result }}" == "success" || "${{ needs.run-check-bulk-cdk-version.result }}" == "skipped" ]]; then
exit 0
else
exit 1
fi