Create GitHub workwlow for acceptnace tests scenario #178
Workflow file for this run
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
# | |
# Copyright (c) 2019-2021 Red Hat, Inc. | |
# This program and the accompanying materials are made | |
# available under the terms of the Eclipse Public License 2.0 | |
# which is available at https://www.eclipse.org/legal/epl-2.0/ | |
# | |
# SPDX-License-Identifier: EPL-2.0 | |
# | |
# Contributors: | |
# Red Hat, Inc. - initial API and implementation | |
# | |
name: Empty workspace smoke test on udi8 | |
on: | |
pull_request: | |
paths-ignore: | |
- '**/*.md' | |
- .devfile.yaml | |
- LICENSE | |
- '.rebase/*' | |
env: | |
USERSTORY: CloneGitRepoAPI | |
TS_API_TEST_KUBERNETES_COMMAND_LINE_TOOL: kubectl | |
DEPLOYMENT_TIMEOUT: 90s | |
jobs: | |
workspace-api-tests-on-minikube: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
- name: Login to Quay | |
uses: docker/login-action@v2 | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAY_USERNAME }} | |
password: ${{ secrets.QUAY_PASSWORD }} | |
- name: Get PR number | |
id: get_pr_number | |
run: | | |
pr_number=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }') | |
echo "PR_NUMBER=$pr_number" >> $GITHUB_ENV | |
- name: Build base image | |
run: | | |
cd base/ubi8 && docker buildx build --platform linux/amd64 -t quay.io/devfile/base-developer-image:${{ env.PR_NUMBER }} . | |
- name: Build universal image | |
run: | | |
cd universal/ubi8 && docker buildx build --platform linux/amd64 -t quay.io/devfile/universal-developer-image:${{ env.PR_NUMBER }} . | |
- name: Push universal base image | |
run: | | |
docker push quay.io/devfile/universal-developer-image:${{ env.PR_NUMBER }} | |
- name: Start minikube cluster | |
id: run-minikube | |
uses: che-incubator/setup-minikube-action@next | |
with: | |
minikube-version: v1.30.1 | |
- name: Checkout DWO | |
uses: actions/checkout@master | |
with: | |
repository: devfile/devworkspace-operator | |
path: devworkspace-operator | |
- name: Checkout tests codebase | |
uses: actions/checkout@master | |
with: | |
ref: api-test-with-clone-project-without-generating | |
repository: eclipse/che | |
path: che | |
- name: Install NodeJs | |
uses: actions/setup-node@v3 | |
- name: Pre-pull image on minikube | |
run: | | |
minikube ssh "docker pull quay.io/devfile/universal-developer-image:${{ env.PR_NUMBER }}" | |
- name: Setup cert manager | |
run: | | |
cd devworkspace-operator | |
make install_cert_manager | |
kubectl wait deployment -n cert-manager cert-manager --for condition=Available=True --timeout=$DEPLOYMENT_TIMEOUT | |
kubectl wait deployment -n cert-manager cert-manager-cainjector --for condition=Available=True --timeout=$DEPLOYMENT_TIMEOUT | |
kubectl wait deployment -n cert-manager cert-manager-webhook --for condition=Available=True --timeout=$DEPLOYMENT_TIMEOUT | |
- name: Setup DWO | |
run: | | |
cd devworkspace-operator | |
make install | |
kubectl rollout status deployment -n devworkspace-controller devworkspace-controller-manager --timeout=$DEPLOYMENT_TIMEOUT | |
kubectl rollout status deployment -n devworkspace-controller devworkspace-webhook-server --timeout=$DEPLOYMENT_TIMEOUT | |
kubectl wait deployment -n devworkspace-controller devworkspace-webhook-server --for condition=Available=True --timeout=$DEPLOYMENT_TIMEOUT | |
kubectl wait deployment -n devworkspace-controller devworkspace-controller-manager --for condition=Available=True --timeout=$DEPLOYMENT_TIMEOUT | |
- name: Run Empty workspace smoke test | |
run: | | |
export TS_API_TEST_UDI_IMAGE=quay.io/devfile/universal-developer-image:${{ env.PR_NUMBER }} | |
export TS_API_TEST_CHE_CODE_EDITOR_DEVFILE_URI=https://eclipse-che.github.io/che-plugin-registry/main/v3/plugins/che-incubator/che-code/latest/devfile.yaml | |
cd che/tests/e2e | |
npm i | |
npm run driver-less-test | |