Skip to content

e2etest-1-language-platforms #246

e2etest-1-language-platforms

e2etest-1-language-platforms #246

name: e2etest-1-language-platforms
on:
workflow_dispatch:
inputs:
tag:
description: "tag: The tag to use for testing"
required: true
default: main
jobs:
create-cluster-deploy-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
repository: 'konveyor/move2kube'
ref: ${{ github.event.inputs.tag }}
- id: get-commit-hash
run: echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
- id: info
uses: konveyor/move2kube-get-env-info@v1
- uses: actions/setup-go@v2
with:
go-version: ${{ steps.info.outputs.go_version }}
- name: build and install move2kube
run: make clean && make build && move2kube version -l
- name: cleanup
run: rm -rf {*,.*} || true
- name: checkout the code
uses: actions/checkout@v2
- run: ls && cat config.yaml
- name: create the kind cluster
uses: helm/kind-action@main
with:
cluster_name: kind
config: config.yaml
kubectl_version: v1.23.3
log_level: debug # https://github.com/kubernetes-sigs/kind/blob/80a6a355a2065823bbdae5048abf76a4f2a3ec9d/pkg/cmd/kind/root.go#L99
- name: deploy to the cluster and test
run: bash -x e2etest-1-language-platforms.sh
- id: get-curl-output
uses: actions/github-script@v5
with:
script: |
return require('fs').readFileSync('temp/myproject/results.txt').toString();
result-encoding: string
- name: slack notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_ICON: https://github.com/actions.png?size=48
SLACK_MESSAGE: "move2kube-tests: results of transforming using commit ${{ steps.get-commit-hash.outputs.commit }} and deploying language-platforms in a cluster\n${{ steps.get-curl-output.outputs.result }}"
SLACK_TITLE: Success
SLACK_USERNAME: GitHubActions