-
Notifications
You must be signed in to change notification settings - Fork 1.2k
137 lines (135 loc) · 5.08 KB
/
jetbrains-integration-test.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
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
132
133
134
135
136
137
name: JetBrains Test
run-name: Test ${{ inputs.jb_product }} (latest=${{ inputs.use_latest }}, build_id=${{ inputs.build_id }})
on:
workflow_dispatch:
inputs:
secret_gateway_link:
type: string
description: Gateway Link
required: true
secret_access_token:
type: string
description: OAuth2 Access Token
required: true
secret_endpoint:
type: string
description: IDE Endpoint
required: true
jb_product:
type: string
description: JB product
required: true
use_latest:
type: string
description: Use latest IDE version
required: true
build_id:
type: string
description: Build ID
required: true
build_url:
type: string
description: Build URL
required: true
jobs:
create-runner:
uses: gitpod-io/gce-github-runner/.github/workflows/create-vm.yml@main
secrets:
runner_token: ${{ secrets.SELF_HOSTED_GITHUB_RUNNER_TOKEN }}
gcp_credentials: ${{ secrets.SELF_HOSTED_GITHUB_RUNNER_GCP_CREDENTIALS }}
jetbrains-smoke-test-linux:
container:
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:pd-test-new-preview-gha.24525
runs-on: ${{ needs.create-runner.outputs.label }}
needs: [create-runner]
steps:
- name: Generate Summary
if: always()
run: |
echo "- Build URL: ${{ inputs.build_url }}" >> $GITHUB_STEP_SUMMARY
echo "- JB Product: ${{ inputs.jb_product }}" >> $GITHUB_STEP_SUMMARY
echo "- Latest Version: ${{ inputs.use_latest }}" >> $GITHUB_STEP_SUMMARY
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "1.19"
- uses: actions/setup-java@v2
with:
distribution: zulu
java-version: "11"
cache: "gradle"
- name: Setup FFmpeg
uses: FedericoCarboni/setup-ffmpeg@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Download build dependency
run: |
sudo apt-get update
sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb libgtk-3-0 libgbm1
sudo wget https://raw.githubusercontent.com/gitpod-io/openvscode-server/main/build/azure-pipelines/linux/xvfb.init
sudo mv ./xvfb.init /etc/init.d/xvfb
sudo chmod +x /etc/init.d/xvfb
sudo update-rc.d xvfb defaults
sudo service xvfb start
- name: Get leeway cache version
env:
TEST_USE_LATEST: ${{ inputs.use_latest }}
run: |
export LEEWAY_WORKSPACE_ROOT=$(pwd)
if [ $TEST_USE_LATEST = "false" ]; then
leeway collect | grep components/ide/jetbrains/gateway-plugin:publish-stable > gateway.version
else
leeway collect | grep components/ide/jetbrains/gateway-plugin:publish-latest > gateway.version
fi
- name: Cache leeway build
id: cache-npm
uses: actions/cache@v3
with:
path: /tmp/cache/
key: ${{ runner.os }}-leeway-cache-${{ hashFiles('gateway.version') }}
restore-keys: |
${{ runner.os }}-leeway-cache-
- name: Smoke Test
env:
DISPLAY: ":10"
LEEWAY_MAX_PROVENANCE_BUNDLE_SIZE: "8388608"
LEEWAY_REMOTE_CACHE_BUCKET: "${{ needs.configuration.outputs.leeway_cache_bucket }}"
TEST_USE_LATEST: ${{ inputs.use_latest }}
run: |
export GATEWAY_LINK=$(jq -r '.inputs.secret_gateway_link' $GITHUB_EVENT_PATH)
export GITPOD_TEST_ACCESSTOKEN=$(jq -r '.inputs.secret_access_token' $GITHUB_EVENT_PATH)
export WS_ENDPOINT=$(jq -r '.inputs.secret_endpoint' $GITHUB_EVENT_PATH)
export LEEWAY_WORKSPACE_ROOT=$(pwd)
if [ $TEST_USE_LATEST = "false" ]; then
sudo mkdir -p /workspace/.gradle-stable
sudo chown -R $(whoami) /workspace
mkdir -p $HOME/.cache/pluginVerifier-stable
leeway run dev/jetbrains-test:test-stable -Dversion=integration-test -DpublishToJBMarketplace=false
else
sudo mkdir -p /workspace/.gradle-latest
sudo chown -R $(whoami) /workspace
mkdir -p $HOME/.cache/pluginVerifier-latest
leeway run dev/jetbrains-test:test-latest -Dversion=integration-test -DpublishToJBMarketplace=false
fi
- name: Move video
if: always()
run: |
cp -r dev/jetbrains-test/video dev/jetbrains-test/build/reports
- name: Save report
if: always()
uses: actions/upload-artifact@v3
with:
name: video
path: |
dev/jetbrains-test/build/reports
delete-runner:
if: always()
needs:
- create-runner
- jetbrains-smoke-test-linux
uses: gitpod-io/gce-github-runner/.github/workflows/delete-vm.yml@main
secrets:
gcp_credentials: ${{ secrets.SELF_HOSTED_GITHUB_RUNNER_GCP_CREDENTIALS }}
with:
runner-label: ${{ needs.create-runner.outputs.label }}
machine-zone: ${{ needs.create-runner.outputs.machine-zone }}