Test rider (latest=false, build_id=11868146507) #10811
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |