Skip to content

Commit

Permalink
Merge pull request #219 from uselagoon/cypress-test
Browse files Browse the repository at this point in the history
merge into cypress
  • Loading branch information
DaveDarsa authored Feb 27, 2024
2 parents 23ae30d + ad53d0f commit 5a1569c
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 8 deletions.
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 prettier@2.8.7 @trivago/prettier-plugin-sort-imports
yarn format-check
yarn add prettier@2.8.7 @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

0 comments on commit 5a1569c

Please sign in to comment.