forked from redhat-developer/intellij-openshift-connector
-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (74 loc) · 3.16 KB
/
cluster_integration_ui_tests.yml
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
name: Integration UI Tests with Local Kind Cluster Context
on:
workflow_run:
workflows: [ "Java CI with Gradle" ]
types:
- completed
jobs:
cluster-integration-ui-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
cache: 'gradle'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@d9c87d481d55275bb5441eef3fe0e46805f9ef70 #v3.5.0
with:
add-job-summary: 'on-failure'
add-job-summary-as-pr-comment: 'on-failure'
validate-wrappers: true
- uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde #v1.10.0
name: Start cluster
#- name: Setup cluster
# run: |
# curl -sL https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.26.0/install.sh | bash -s v0.26.0
# kubectl create -f https://operatorhub.io/install/service-binding-operator.yaml
# kubectl create -f https://operatorhub.io/install/stable/cloud-native-postgresql.yaml
# nb=0
# echo -n "Waiting for operator to show up "
# while [ "$nb" != "2" ]
# do
# echo -n "."
# sleep 1
# nb=`kubectl get pods -n operators --no-headers --ignore-not-found | grep Running | wc -l`
# done
# TODO remove locally building common-ui-test-library after new release of common-ui-test-library
- name: 'Clone common-ui-test-library to Maven Local repository'
run: |
git clone --branch ghabranch https://github.com/martinszuc/intellij-common-ui-test-library.git ../common-ui-test-library
- uses: burrunan/gradle-cache-action@3bf23b8dd95e7d2bacf2470132454fe893a178a1 #v1
name: Build common-ui-test-library
with:
build-root-directory: ../common-ui-test-library
arguments: publishToMavenLocal
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Play cluster integration UI tests
env:
GPG_PASSPHRASE: ${{ secrets.IDEA_KEY_PASSPHRASE }}
CLUSTER_ALREADY_LOGGED_IN: 'true'
RUN_CLUSTER_TESTS: 'true'
run: |
echo -n "$GPG_PASSPHRASE" | gpg --decrypt --passphrase-fd 0 --pinentry-mode loopback --output idea_license_token/idea.key idea_license_token/idea.key.gpg
export DISPLAY=:99.0
Xvfb -ac :99 -screen 0 1920x1080x16 &
sleep 10
./gradlew integrationUITest --continue --no-daemon
- name: Publish tests reports
if: always()
uses: scacap/action-surefire-report@a2911bd1a4412ec18dde2d93b1758b3e56d2a880 #v1.8.0
with:
github_token: ${{secrets.GITHUB_TOKEN}}
report_paths: '${{github.workspace}}/build/test-results/**/TEST-*.xml'
commit: ${{github.event.workflow_run.head_sha}}
check_name: Cluster Integration UI Tests Report
- name: Publish screenshots as artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: screenshots
path: ./build/screenshots