Skip to content

updates and tests

updates and tests #14

on:
pull_request:
#types:
# - labeled
jobs:
integration-tests:
runs-on: ubuntu-latest
#if: ${{ github.event.label.name == 'TODO' }}
env:
KUBECONFIG: ${{ github.workspace }}/kubeconfig.yaml
steps:
#- name: Remove label
# uses: andymckay/labeler@master
# with:
# remove-labels: "TODO"
# install and login
- uses: actions/checkout@v3
- name: Install Telepresence
uses: ./install
- name: Login
uses: ./login
with:
telepresence_api_key: ${{ secrets.TELEPRESENCE_API_KEY }}
# we need a demo cluster
- uses: azure/setup-kubectl@v3
with:
version: "v1.25.3"
id: kubectl
- name: Provision Kubeception cluster
uses: datawire/infra-actions/[email protected]
with:
distribution: Kubeception
version: 1.26
kubeconfig: ${{ env.KUBECONFIG }}
kubeceptionToken: ${{ secrets.ST_KUBECEPTION_ACCESS_TOKEN }}
gkeCredentials: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
- name: Install Demo App in Cluster
shell: bash
run: |
kubectl apply -f https://raw.githubusercontent.com/datawire/edgey-corp-nodejs/main/k8s-config/edgey-corp-web-app-no-mapping.yaml
# continue tests
- name: Install Traffic manager"
uses: ./helm
- name: Telepresence connect
uses: ./connect
- name: Test Connection with Curl
shell: bash
run: |
output=$(curl -H "x-tele-actions-header=dataprocessingservice" verylargejavaservice | grep 'green')
if [ -z "$output" ]; then
echo "Failed in step: ${STEP}"
echo "> Output wasn't supposed to be empty and it was"
exit 1
fi
- name: Intercept the service
uses: ./intercept
with:
service_name: dataprocessingservice
service_port: 3000:3000
http_header: "x-tele-actions-header=dataprocessingservice" # Custom HTTP header name and value that will identify traffic desired to go to the local service instace.
print_logs: true # Flag to instruct the action to print out Telepresence logs and export an artifact with them
- name: Test Intercept with Curl
shell: bash
run: |
output=$(curl -H "x-tele-actions-header=dataprocessingservice" verylargejavaservice | grep 'blue')
if [ -z "$output" ]; then
echo "Failed in step: ${STEP}"
echo "> Output wasn't supposed to be empty and it was"
exit 1
fi