Skip to content

Commit

Permalink
Tests from Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
feloy committed Sep 28, 2021
1 parent fc1133b commit e08868e
Showing 1 changed file with 65 additions and 27 deletions.
92 changes: 65 additions & 27 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# To configure this workflow:
#
# 2. Setup secrets in your repository: IBM_CLOUD_API_KEY and IKS_CLUSTER
# 2. Setup secrets in your repository: IBM_CLOUD_API_KEY and IKS_CLUSTER_ID
# 3. Change the values for the IBM_CLOUD_REGION and IBM_CLOUD_RESOURCE_GROUP

name: Build and Test on IKS
Expand All @@ -21,18 +21,71 @@ env:
GITHUB_SHA: ${{ github.sha }}
IBM_CLOUD_API_KEY: ${{ secrets.IBM_CLOUD_API_KEY }}
IBM_CLOUD_REGION: eu-de
IKS_CLUSTER: ${{ secrets.IBM_CLOUD_OPENSHIFT_CLUSTER }}
IKS_CLUSTER_ID: ${{ secrets.IBM_CLOUD_OPENSHIFT_CLUSTER }}
IBM_CLOUD_RESOURCE_GROUP: odo-phmartin-openshift-group
IKS_CLUSTER_ENDPOINT: ${{ secrets.IBM_CLOUD_OPENSHIFT_CLUSTER_ENDPOINT }}

jobs:
setup-build-test:
name: Setup, Build and Test
runs-on: ubuntu-latest
# integration-tests-linux:
# name: Run integration tests on Linux
# runs-on: ubuntu-latest
# steps:
#
# - name: Checkout
# uses: actions/checkout@v2
#
# - name: Setup Go
# uses: actions/setup-go@v2
# with:
# go-version: '^1.15.1'
#
# - name: Build odo
# run: make install
#
# - name: Install IBM Cloud CLI
# run: |
# curl -fsSL https://clis.cloud.ibm.com/install/linux | sh
# ibmcloud --version
# ibmcloud config --check-version=false
# ibmcloud plugin install -f kubernetes-service
#
# - name: Authenticate with IBM Cloud CLI
# run: |
# ibmcloud login --apikey "${IBM_CLOUD_API_KEY}" -r "${IBM_CLOUD_REGION}" -g "${IBM_CLOUD_RESOURCE_GROUP}"
#
# - name: Connect to Openshift cluster
# run: |
# ibmcloud ks cluster config --cluster ${IKS_CLUSTER_ID} --admin
# ENDPOINT="$(kubectl config view -o jsonpath='{range .clusters[0]}{.cluster.server}{end}')"
# oc login -u apikey -p ${IBM_CLOUD_API_KEY} --server=${ENDPOINT}
#
# - name: Run Integration tests
# run: |
# make test-integration
# make test-integration-devfile
# make test-operator-hub
# make test-cmd-login-logout
# make test-cmd-project
# make test-e2e-devfile
#
integration-tests-windows:
name: Run integration tests on Windows
runs-on: windows-latest
steps:

- name: Checkout
uses: actions/checkout@v2

- name: Install CLI tools from OpenShift Mirror
uses: redhat-actions/openshift-tools-installer@v1
with:
source: "mirror"
oc: "latest"

- name: Connect to Openshift cluster
run: |
oc login -u apikey -p $IBM_CLOUD_API_KEY --server $IKS_CLUSTER_ENDPOINT
- name: Setup Go
uses: actions/setup-go@v2
with:
Expand All @@ -41,28 +94,13 @@ jobs:
- name: Build odo
run: make install

- name: Install IBM Cloud CLI
run: |
curl -fsSL https://clis.cloud.ibm.com/install/linux | sh
ibmcloud --version
ibmcloud config --check-version=false
ibmcloud plugin install -f kubernetes-service
- name: Authenticate with IBM Cloud CLI
run: |
ibmcloud login --apikey "${IBM_CLOUD_API_KEY}" -r "${IBM_CLOUD_REGION}" -g "${IBM_CLOUD_RESOURCE_GROUP}"
- name: Connect to Openshift cluster
run: |
ibmcloud ks cluster config --cluster $IKS_CLUSTER --admin
ENDPOINT="$(kubectl config view -o jsonpath='{range .clusters[0]}{.cluster.server}{end}')"
oc login -u apikey -p ${IBM_CLOUD_API_KEY} --server=${ENDPOINT}
- name: Run Integration tests
run: |
make test-integration
make test-integration-devfile
make test-operator-hub
make test-cmd-login-logout
make test-cmd-project
make test-e2e-devfile
# make test-integration
# make test-integration-devfile
# make test-operator-hub
# make test-cmd-login-logout
# make test-cmd-project
# make test-e2e-devfile

0 comments on commit e08868e

Please sign in to comment.