Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cypress test #219

Merged
merged 4 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 34 additions & 6 deletions .github/workflows/ui-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
push:
branches:
- main
- cypress-test

jobs:
format-check:
Expand All @@ -21,8 +22,8 @@ jobs:

- name: Formatting check
run: |
yarn add [email protected] @trivago/prettier-plugin-sort-imports
yarn format-check
yarn add [email protected] @trivago/prettier-plugin-sort-imports
yarn format-check

lint:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -55,14 +56,41 @@ jobs:
cd test
make up

- name: Run Cypress Tests
- name: Start ui
env:
GRAPHQL_API: http://0.0.0.0:33000/graphql
KEYCLOAK_API: http://0.0.0.0:38088/auth
run: |
yarn install
yarn build
yarn start &

- name: Run RBAC Cypress Tests
uses: cypress-io/github-action@v6
with:
config-file: ./cypress/cypress.config.ts
auto-cancel-after-failures: 1
wait-on: 'http://localhost:3000'
command: yarn cypress:runRbac
continue-on-error: true

- name: Run General Cypress Tests
uses: cypress-io/github-action@v6
with:
config-file: ./cypress/cypress.config.ts
auto-cancel-after-failures: 1
wait-on: 'http://localhost:3000'
command: yarn cypress:runGeneral
continue-on-error: true

- name: Run Organization Cypress Tests
uses: cypress-io/github-action@v6
with:
config-file: ./cypress/cypress.config.ts
auto-cancel-after-failures: 1
wait-on: "http://0.0.0.0:3000"
build: yarn build && GRAPHQL_API=http://0.0.0.0:33000/graphql KEYCLOAK_API=http://0.0.0.0:38088/auth yarn start
command: yarn cypress:runAll
wait-on: 'http://localhost:3000'
command: yarn cypress:runOrganizations
continue-on-error: true

- name: Stop Docker containers
run: |
Expand Down
3 changes: 1 addition & 2 deletions test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ KCADM_LOGIN = $(KCADM) config credentials --config $(KCADM_CONFIG) $(KCADM_STRIN

.PHONY: build-lagoon
build-lagoon:
docker compose pull
docker compose up -d
docker compose up -d --quiet-pull
$(MAKE) wait-for-keycloak
@echo "\nYour Lagoon stack is now running locally - use 'GRAPHQL_API=http://0.0.0.0:33000/graphql KEYCLOAK_API=http://0.0.0.0:38088/auth' as the variables to access it\n"

Expand Down
Loading