Skip to content

Commit

Permalink
Added end2end test agaist latest 2 release (#51)
Browse files Browse the repository at this point in the history
* Added end2end test

Signed-off-by: Yuvraj <[email protected]>
  • Loading branch information
yindia authored Mar 3, 2022
1 parent c154506 commit 2b5fb6f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
31 changes: 20 additions & 11 deletions flytetools/.github/workflows/end2end.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,24 @@ on:
required: true
type: string
jobs:
list:
runs-on: ubuntu-latest
name: "Create a list of latest 2 release"
steps:
- uses: actions/checkout@v2
- name: "Provide the list"
id: create-list
run: echo "::set-output name=releases::$( curl -sL "https://api.github.com/repos/flyteorg/flyte/releases" | jq -c '.[] | select(.prerelease==false) | .tag_name' | jq --slurp . | jq -c . | jq -c '.[0:2]')"
outputs:
releases: "${{ steps.create-list.outputs.releases }}"

endtoend:
name: End to End tests
runs-on: ubuntu-latest
needs: [list]
strategy:
matrix:
version: "${{ fromJson(needs.list.outputs.releases) }}"
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -33,17 +48,10 @@ jobs:
run: |
cp /tmp/tmp/docker-images/snapshot.tar snapshot.tar
flytectl config init
flytectl sandbox start --source=$(pwd)
flytectl sandbox start --source=$(pwd) --version=${{ matrix.version }}
- name: Prime docker cache
run: |
flytectl sandbox exec -- docker load -i /root/snapshot.tar
- name: Upgrade Helm charts
run: |
flytectl sandbox exec -- helm repo add flyteorg https://flyteorg.github.io/flyte
flytectl sandbox exec -- helm repo update
flytectl sandbox exec -- helm upgrade flyte -n flyte --kubeconfig=/etc/rancher/k3s/k3s.yaml flyteorg/flyte -f /flyteorg/share/flyte/values.yaml --wait --set flyte.${{ github.event.repository.name }}.image.repository=flyteorg/${{ github.event.repository.name }},flyte.${{ github.event.repository.name }}.image.tag=latest
flytectl sandbox exec -- k3s kubectl get pods -n flyte -oyaml
- name: Setup Flytekit
run: |
python -m pip install --upgrade pip
Expand All @@ -61,14 +69,15 @@ jobs:
env:
PRIORITIES: "${{ inputs.priorities }}"
run: |
./boilerplate/flyte/end2end/end2end.sh
make end2end_execute
- name: Upgrade Helm charts
run: |
flytectl sandbox exec -- helm repo add flyteorg https://flyteorg.github.io/flyte
flytectl sandbox exec -- helm repo update
flytectl sandbox exec -- helm upgrade flyte -n flyte --kubeconfig=/etc/rancher/k3s/k3s.yaml flyteorg/flyte -f /flyteorg/share/flyte/values.yaml --wait --set ${{ github.event.repository.name }}.image.repository=flyteorg/${{ github.event.repository.name }},${{ github.event.repository.name }}.image.tag=latest
flytectl sandbox exec -- helm upgrade flyte -n flyte --kubeconfig=/etc/rancher/k3s/k3s.yaml flyteorg/flyte -f /flyteorg/share/flyte/values.yaml --wait --set flyte.${{ github.event.repository.name }}.image.repository=flyteorg/${{ github.event.repository.name }},flyte.${{ github.event.repository.name }}.image.tag=latest
flytectl sandbox exec -- k3s kubectl get pods -n flyte -oyaml
- name: Post Upgrade Tests
env:
PRIORITIES: "${{ inputs.priorities }}"
run: |
./boilerplate/flyte/end2end/end2end.sh
make end2end_execute
1 change: 1 addition & 0 deletions flytetools/.github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
description: "Cache key for docker image"
required: true
type: string

jobs:
integration:
name: Integration tests
Expand Down

0 comments on commit 2b5fb6f

Please sign in to comment.