15
15
name : Build e2e tests
16
16
17
17
on :
18
- workflow_run :
19
- workflows :
20
- - Trigger build
21
- types :
22
- - completed
18
+ push :
19
+ branches : [ develop, release/** ]
20
+ pull_request :
21
+ branches : [ develop, release/** ]
22
+ types : [ opened, synchronize, reopened, labeled ]
23
+ workflow_dispatch :
23
24
24
25
jobs :
25
- build :
26
+ build-e2e-tests :
26
27
runs-on : k8s-runner-e2e
27
-
28
- if : ${{ github.event.workflow_run.conclusion != 'skipped' }}
28
+ # We allow builds:
29
+ # 1) When triggered manually
30
+ # 2) When it's a merge into a branch
31
+ # 3) For PRs that are labeled as build and
32
+ # - It's a code change
33
+ # - A build label was just added
34
+ # A bit complex, but prevents builds when other labels are manipulated
35
+ if : >
36
+ github.event_name == 'workflow_dispatch'
37
+ || github.event_name == 'push'
38
+ || (contains(github.event.pull_request.labels.*.name, 'build')
39
+ && (github.event.action != 'labeled' || github.event.label.name == 'build')
40
+ )
29
41
30
42
steps :
31
- # Pinned 1.0.0 version
32
- - uses : haya14busa/action-workflow_run-status@967ed83efa565c257675ed70cfe5231f062ddd94
33
- - uses : actions/checkout@v3
43
+ - uses : actions/checkout@v4
34
44
with :
35
45
path : plugin
36
- ref : ${{ github.event.workflow_run.head_sha }}
37
46
38
47
- name : Checkout e2e test repo
39
- uses : actions/checkout@v3
48
+ uses : actions/checkout@v4
40
49
with :
41
50
repository : cdapio/cdap-e2e-tests
42
51
path : e2e
52
+ ref : release/6.11
43
53
44
54
- name : Cache
45
- uses : actions/cache@v3
55
+ uses : actions/cache@v4
46
56
with :
47
57
path : ~/.m2/repository
48
58
key : ${{ runner.os }}-maven-${{ github.workflow }}-${{ hashFiles('**/pom.xml') }}
51
61
52
62
- name : Get Secrets from GCP Secret Manager
53
63
id : ' secrets'
54
- uses : ' google-github-actions/get-secretmanager-secrets@v0 '
64
+ uses : ' google-github-actions/get-secretmanager-secrets@v2 '
55
65
with :
56
66
secrets : |-
57
67
SALESFORCE_USERNAME:cdapio-github-builds/SALESFORCE_USERNAME
@@ -69,33 +79,21 @@ jobs:
69
79
SALESFORCE_CONSUMER_KEY : ${{ steps.secrets.outputs.SALESFORCE_CONSUMER_KEY }}
70
80
SALESFORCE_CONSUMER_SECRET : ${{ steps.secrets.outputs.SALESFORCE_CONSUMER_SECRET }}
71
81
72
- - name : Upload report
73
- uses : actions/upload-artifact@v3
74
- if : always()
75
- with :
76
- name : Cucumber report
77
- path : ./plugin/target/cucumber-reports
78
-
79
82
- name : Upload debug files
80
- uses : actions/upload-artifact@v3
83
+ uses : actions/upload-artifact@v4
81
84
if : always()
82
85
with :
83
86
name : Debug files
84
87
path : ./**/target/e2e-debug
85
88
86
89
- name : Upload reports to GCS
87
- uses : google-github-actions/upload-cloud-storage@v0
90
+ uses : google-github-actions/upload-cloud-storage@v2
88
91
if : always()
89
92
with :
90
93
path : ./plugin/target/cucumber-reports
91
94
destination : e2e-tests-cucumber-reports/${{ github.event.repository.name }}/${{ github.ref }}
92
95
93
- - name : github-status-action
94
- uses : Sibz/github-status-action@67af1f4042a5a790681aad83c44008ca6cfab83d
96
+ - name : Cucumber Report URL
95
97
if : always()
96
- with :
97
- authToken : ${{ secrets.GITHUB_TOKEN }}
98
- state : success
99
- context : Cucumber report
100
- sha : ${{github.event.pull_request.head.sha || github.sha}}
98
+ run : echo "https://storage.googleapis.com/e2e-tests-cucumber-reports/${{ github.event.repository.name }}/${{ github.ref }}/cucumber-reports/advanced-reports/cucumber-html-reports/overview-features.html"
101
99
0 commit comments