This repository has been archived by the owner on Nov 27, 2023. It is now read-only.
chore(deps): update react monorepo #2856
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 🏗️ E2E Tests (Cypress) | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: [ opened, synchronize, reopened ] | |
jobs: | |
install: | |
runs-on: ubuntu-latest | |
container: | |
image: cypress/browsers:node16.14.2-slim-chrome100-ff99-edge | |
options: --user 1001 | |
outputs: | |
record: ${{ steps.should-we-record.outputs.record }} | |
steps: | |
- name: 👷♀️ Checkout | |
uses: actions/checkout@v4 | |
- name: 🎥 Should we record? | |
run: echo "{record}={${{ env.CYPRESS_PROJECT_ID != '' }}}" >> $GITHUB_OUTPUT | |
id: should-we-record | |
- name: 👩🏭 Cypress install | |
uses: cypress-io/[email protected] | |
with: | |
runTests: false | |
install-command: yarn install --immutable | |
build: yarn workspace @kaoto/kaoto-ui run build | |
record: true | |
env: | |
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }} | |
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Enabling post scripts is required for the Cypress binary installation command to work | |
CYPRESS_YARN_ENABLE_SCRIPTS: "true" | |
- name: 💾 Save build folder | |
uses: actions/upload-artifact@v3 | |
with: | |
name: kaoto-ui-dist | |
if-no-files-found: error | |
path: packages/kaoto-ui/dist | |
test-on-firefox: | |
needs: install | |
runs-on: ubuntu-latest | |
container: | |
image: cypress/browsers:node16.14.2-slim-chrome100-ff99-edge | |
options: --user 1001 | |
services: | |
kaoto: | |
image: kaotoio/backend:main | |
ports: | |
# will assign a random free host port | |
- 8081/tcp | |
env: | |
QUARKUS_HTTP_CORS_ORIGINS: "http://localhost:1337" | |
steps: | |
- name: 👷♀️ Checkout | |
uses: actions/checkout@v4 | |
- name: 🗄️ Download the build folders | |
uses: actions/download-artifact@v3 | |
with: | |
name: kaoto-ui-dist | |
path: packages/kaoto-ui/dist | |
- name: 🤓 Set KAOTO_API | |
run: echo "KAOTO_API=http://kaoto:8081" > packages/kaoto-ui/.env | |
- name: 🔨 Cypress run | |
uses: cypress-io/[email protected] | |
with: | |
browser: firefox | |
# we have already installed all dependencies above | |
# install: false | |
start: yarn workspace @kaoto/kaoto-ui run start | |
working-directory: packages/kaoto-ui | |
record: ${{needs.install.outputs.record}} | |
wait-on: 'http://localhost:1337' | |
wait-on-timeout: 120 | |
env: | |
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }} | |
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: 💾 Save videos | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: videos-firefox | |
path: packages/kaoto-ui/cypress/videos | |
- name: 💾 Save screenshots | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: screenshots-firefox | |
path: packages/kaoto-ui/cypress/screenshots | |
test-on-chrome: | |
needs: install | |
runs-on: ubuntu-latest | |
container: | |
image: cypress/browsers:node16.14.2-slim-chrome100-ff99-edge | |
options: --user 1001 | |
services: | |
kaoto: | |
image: kaotoio/backend:main | |
ports: | |
# will assign a random free host port | |
- 8081/tcp | |
env: | |
QUARKUS_HTTP_CORS_ORIGINS: "http://localhost:1337" | |
steps: | |
- name: 👷♀️ Checkout | |
uses: actions/checkout@v4 | |
- name: 🗄️ Download the build folders | |
uses: actions/download-artifact@v3 | |
with: | |
name: kaoto-ui-dist | |
path: packages/kaoto-ui/dist | |
- name: 🤓 Set KAOTO_API | |
run: echo "KAOTO_API=http://kaoto:8081" > packages/kaoto-ui/.env | |
- name: 🔨 Cypress run | |
uses: cypress-io/[email protected] | |
with: | |
browser: chrome | |
# we have already installed all dependencies above | |
# install: false | |
start: yarn workspace @kaoto/kaoto-ui run start | |
working-directory: packages/kaoto-ui | |
record: ${{needs.install.outputs.record}} | |
wait-on: 'http://localhost:1337' | |
wait-on-timeout: 120 | |
env: | |
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }} | |
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: 💾 Save videos | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: videos-chrome | |
path: packages/kaoto-ui/cypress/videos | |
- name: 💾 Save screenshots | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: screenshots-chrome | |
path: packages/kaoto-ui/cypress/screenshots | |
test-on-edge: | |
needs: install | |
runs-on: ubuntu-latest | |
container: | |
image: cypress/browsers:node16.14.2-slim-chrome100-ff99-edge | |
options: --user 1001 | |
services: | |
kaoto: | |
image: kaotoio/backend:main | |
ports: | |
# will assign a random free host port | |
- 8081/tcp | |
env: | |
QUARKUS_HTTP_CORS_ORIGINS: "http://localhost:1337" | |
steps: | |
- name: 👷♀️ Checkout | |
uses: actions/checkout@v4 | |
- name: 🗄️ Download the build folders | |
uses: actions/download-artifact@v3 | |
with: | |
name: kaoto-ui-dist | |
path: packages/kaoto-ui/dist | |
- name: 🤓 Set KAOTO_API | |
run: echo "KAOTO_API=http://kaoto:8081" > packages/kaoto-ui/.env | |
- name: 🔨 Cypress run | |
uses: cypress-io/[email protected] | |
with: | |
browser: edge | |
# we have already installed all dependencies above | |
# install: false | |
start: yarn workspace @kaoto/kaoto-ui run start | |
working-directory: packages/kaoto-ui | |
record: ${{needs.install.outputs.record}} | |
wait-on: 'http://localhost:1337' | |
wait-on-timeout: 120 | |
env: | |
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }} | |
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: 💾 Save videos | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: videos-edge | |
path: packages/kaoto-ui/cypress/videos | |
- name: 💾 Save screenshots | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: screenshots-edge | |
path: packages/kaoto-ui/cypress/screenshots |