keycloak-scim/.github/workflows/cypress.yml
Aboullos daec4957f2
Add cypress framework (#271)
* Add cypress framework

* Add PR change requests

* Add initial .yml file for cypress tests

* Modify Run Keycloak line

* Modify Run Keycloak lines

* Modify Cypress test run

* Modify wait times

* Add more time

* Modify yarn start to npx http-server

* Try Cypress separate step

* Add test to set new admin console

* Modify uses to run

* Change yarn to npx http-server

* Add parameter to npx http-server

* Trigger GitHub actions

* Trigger GitHub actions

* Modify client_scope test messages

* Set headless mode

* Add steps to store artifacts

* Modify .yml

* Rebase onto realm fix and update real role message

* Update yaml file for artifact upload
2021-01-12 12:04:52 -05:00

53 lines
No EOL
1.3 KiB
YAML

name: Cypress run
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
cypress-run:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install -g yarn
- run: yarn install
- run: yarn build
- name: Run Keycloak
run: ./start.js & sleep 40
- name: Run Admin Console
run: npx http-server ./build -P http://localhost:8180/auth/ & sleep 30
- name: Create admin user and add Admin Console client
run: cd tests && npx cypress run --headless --browser chrome --spec cypress/integration/00_set_new_admin_console.spec.js && cd ..
- name: Cypress run
run: cd tests && npx cypress run --headless --browser chrome --config ignoreTestFiles=00_set_new_admin_console.spec.js && cd ..
- name: Add Cypress videos artifacts
uses: actions/upload-artifact@v2
if: failure()
with:
name: cypress-videos
path: tests/assets/videos
- name: Add Cypress screenshots artifacts
uses: actions/upload-artifact@v2
if: failure()
with:
name: cypress-screenshots
path: tests/assets/screenshots