Skip to content

Commit

Permalink
debug cypress ci
Browse files Browse the repository at this point in the history
  • Loading branch information
sam committed Feb 24, 2024
1 parent 117db0b commit 9c737e1
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/workflows/ci-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: testing cypress envs

on:
pull_request:
branches:
- master
- staging
- dev

jobs:
setup:
runs-on: ubuntu-22.04
strategy:
fail-fast: true
matrix:
php-versions: ['7.4']
steps:
- name: Checkout code
uses: actions/checkout@v4

# RUN CYPRESS TESTS ----------------
- name: Run Cypress keycloak tests
uses: cypress-io/github-action@v6
with:
start: npm run cy:test:oidc
env:
CYPRESS_BASE_URL: http://localhost:8000
CYPRESS_KEYCLOAK_URL: http://localhost:8080


26 changes: 26 additions & 0 deletions .github/workflows/ci-test2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: testing cypress envs

on:
pull_request:
branches:
- master
- staging
- dev

jobs:
setup:
runs-on: ubuntu-22.04
strategy:
fail-fast: true
matrix:
php-versions: ['7.4']
steps:
- name: Checkout code
uses: actions/checkout@v4

# RUN CYPRESS TESTS ----------------
- name: Run Cypress keycloak tests
uses: cypress-io/github-action@v6
with:
start: npm run cy:test:oidc

2 changes: 1 addition & 1 deletion cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ module.exports = defineConfig({
viewportHeight: 1080,
},
env: {
keycloakUrl: 'http://localhost:8080',
keycloakUrl: 'http://keycloak:8080',
},
});
4 changes: 4 additions & 0 deletions cypress/e2e/keycloak/admin/admin1_can_login.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ import {login} from "../keycloak_reusables.cytools";

const keycloakUrl = Cypress.env('keycloakUrl') || 'http://localhost:8080'

if (!keycloakUrl) {
throw new Error('keycloakUrl is not defined')
}

Cypress.on('uncaught:exception', (err, runnable) => {
return false
})
Expand Down

0 comments on commit 9c737e1

Please sign in to comment.