Skip to content

Commit

Permalink
ci: init e2e(check deployment and app create) (#1056)
Browse files Browse the repository at this point in the history
Signed-off-by: Bird <aflybird0@gmail.com>
  • Loading branch information
aFlyBird0 committed Apr 23, 2023
1 parent b900f90 commit 0c43722
Show file tree
Hide file tree
Showing 7 changed files with 429 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/build-sealos-cluster-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,13 @@ jobs:
sudo buildah manifest add $IMAGE:$VERSION docker://$IMAGE:$VERSION-amd64
sudo buildah manifest add $IMAGE:$VERSION docker://$IMAGE:$VERSION-arm64
sudo buildah manifest push --all $IMAGE:$VERSION docker://$IMAGE:$VERSION
trigger-workflow-e2e:
needs: [build_cluster_image]
runs-on: ubuntu-latest
steps:
- name: trigger cluster image workflow
uses: peter-evans/repository-dispatch@v2
with:
event-type: cluster_image_build_success
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "version": "latest"}'
10 changes: 10 additions & 0 deletions .github/workflows/dockerize-runtime-nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,13 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64, linux/arm64

trigger-workflow-e2e:
needs: [dockerize-main-image, dockerize-init-image]
runs-on: ubuntu-latest
steps:
- name: trigger cluster image workflow
uses: peter-evans/repository-dispatch@v2
with:
event-type: dockerize-runtime-success
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "version": "latest"}'
36 changes: 36 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: e2e

on:
repository_dispatch:
types: [cluster_image_build_success, dockerize_runtime_success]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
DOMAIN: 127.0.0.1.nip.io

jobs:
e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Remove builtin docker
run: |
sudo apt-get remove -y moby-engine moby-cli moby-buildx moby-compose
- name: Deploy laf
env:
DOMAIN: ${{ env.DOMAIN }}
working-directory: deploy/scripts
run: sudo sh install-on-linux.sh $DOMAIN # this script will install sealos and laf

- name: Run E2E Test
working-directory: e2e
run: |
sudo sh e2e.sh
Loading

0 comments on commit 0c43722

Please sign in to comment.