Skip to content

Commit

Permalink
[CI] Run playwright tests with images from CI build using minikube (#919
Browse files Browse the repository at this point in the history
)

* add minikube workflow
* Run playwright tests with CI images, adjust tests for anonymous login

---------

Signed-off-by: jkalinic <[email protected]>
Signed-off-by: Michael Edgar <[email protected]>
Co-authored-by: Michael Edgar <[email protected]>
  • Loading branch information
jankalinic and MikeEdgar authored Aug 28, 2024
1 parent b54f62b commit 43b89b8
Show file tree
Hide file tree
Showing 21 changed files with 416 additions and 129 deletions.
60 changes: 54 additions & 6 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ jobs:
context: operator/target/bundle/console-operator/
platforms: linux/amd64,linux/arm64
provenance: false
push: false
push: true
file: operator/target/bundle/console-operator/bundle.Dockerfile
tags: |
streamshub/console-operator-bundle:${{ env.PROJECT_VERSION }}
localhost:5000/streamshub/console-operator-bundle:${{ env.PROJECT_VERSION }}
- name: Build Operator Catalog
run: |
Expand All @@ -93,10 +93,10 @@ jobs:
context: operator/target/
platforms: linux/amd64,linux/arm64
provenance: false
push: false
push: true
file: operator/target/catalog.Dockerfile
tags: |
streamshub/console-operator-catalog:${{ env.PROJECT_VERSION }}
localhost:5000/streamshub/console-operator-catalog:${{ env.PROJECT_VERSION }}
- name: Attach Kubernetes Resources
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -133,8 +133,35 @@ jobs:
!**/target/failsafe-reports/**/*
!**/target/surefire-reports/**/*
- name: Save Images
run: |
docker pull localhost:5000/streamshub/console-api:${{ env.PROJECT_VERSION }}
docker pull localhost:5000/streamshub/console-operator:${{ env.PROJECT_VERSION }}
docker pull localhost:5000/streamshub/console-operator-bundle:${{ env.PROJECT_VERSION }}
docker pull localhost:5000/streamshub/console-operator-catalog:${{ env.PROJECT_VERSION }}
docker save -o console-api-${{ env.PROJECT_VERSION }}.tar localhost:5000/streamshub/console-api:${{ env.PROJECT_VERSION }}
docker save -o console-operator-${{ env.PROJECT_VERSION }}.tar localhost:5000/streamshub/console-operator:${{ env.PROJECT_VERSION }}
docker save -o console-operator-bundle-${{ env.PROJECT_VERSION }}.tar localhost:5000/streamshub/console-operator-bundle:${{ env.PROJECT_VERSION }}
docker save -o console-operator-catalog-${{ env.PROJECT_VERSION }}.tar localhost:5000/streamshub/console-operator-catalog:${{ env.PROJECT_VERSION }}
- name: Archive Images
uses: actions/upload-artifact@v4
with:
name: backend-images
path: |
console-api-${{ env.PROJECT_VERSION }}.tar
console-operator-${{ env.PROJECT_VERSION }}.tar
console-operator-bundle-${{ env.PROJECT_VERSION }}.tar
console-operator-catalog-${{ env.PROJECT_VERSION }}.tar
build-ui:
runs-on: ubuntu-latest
services:
registry:
image: registry:2
ports:
- 5000:5000
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -147,6 +174,8 @@ jobs:

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host

- name: Build UI
working-directory: ui
Expand All @@ -165,6 +194,25 @@ jobs:
context: ui/
platforms: linux/amd64,linux/arm64
provenance: false
push: false
push: true
tags: |
streamshub/console-ui:${{ env.PROJECT_VERSION }}
localhost:5000/streamshub/console-ui:${{ env.PROJECT_VERSION }}
- name: Save Image
run: |
docker pull localhost:5000/streamshub/console-ui:${{ env.PROJECT_VERSION }}
docker save -o console-ui-${{ env.PROJECT_VERSION }}.tar localhost:5000/streamshub/console-ui:${{ env.PROJECT_VERSION }}
- name: Archive Image
uses: actions/upload-artifact@v4
with:
name: frontend-images
path: |
console-ui-${{ env.PROJECT_VERSION }}.tar
Playwright:
if: ${{ contains(github.event.pull_request.labels.*.name, 'safe to test') || github.repository == 'streamshub/console' }}
uses: ./.github/workflows/playwright-tests.yml
needs:
- build-api
- build-ui
40 changes: 0 additions & 40 deletions .github/workflows/playwright-test.yml

This file was deleted.

Loading

0 comments on commit 43b89b8

Please sign in to comment.