2021-01-12 17:04:52 +00:00
|
|
|
name: Cypress run
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
cypress-run:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-04-30 08:43:23 +00:00
|
|
|
node-version: [16.x]
|
2021-01-12 17:04:52 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
2021-04-30 08:43:23 +00:00
|
|
|
uses: actions/setup-node@v2
|
2021-01-12 17:04:52 +00:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
2021-04-30 08:43:23 +00:00
|
|
|
check-latest: true
|
2021-01-12 17:04:52 +00:00
|
|
|
|
|
|
|
- run: npm install -g yarn
|
|
|
|
- run: yarn install
|
|
|
|
- run: yarn build
|
|
|
|
|
|
|
|
- name: Run Keycloak
|
|
|
|
run: ./start.js & sleep 40
|
|
|
|
|
|
|
|
- name: Run Admin Console
|
2021-05-06 05:31:40 +00:00
|
|
|
run: |
|
|
|
|
mkdir ./build/adminv2 && mv ./build/js ./build/adminv2/
|
|
|
|
npx http-server ./build -P http://localhost:8180/ & sleep 30
|
2021-01-12 17:04:52 +00:00
|
|
|
|
2021-01-28 15:04:48 +00:00
|
|
|
- name: Admin Console client
|
|
|
|
run: ./import.js
|
2021-01-12 17:04:52 +00:00
|
|
|
|
|
|
|
- name: Cypress run
|
2021-02-19 06:37:22 +00:00
|
|
|
run: yarn start:cypress-tests --headless --browser chrome
|
2021-01-12 17:04:52 +00:00
|
|
|
|
|
|
|
- name: Add Cypress videos artifacts
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
if: failure()
|
|
|
|
with:
|
|
|
|
name: cypress-videos
|
2021-02-19 06:37:22 +00:00
|
|
|
path: assets/videos
|
2021-01-12 17:04:52 +00:00
|
|
|
|
|
|
|
- name: Add Cypress screenshots artifacts
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
if: failure()
|
|
|
|
with:
|
|
|
|
name: cypress-screenshots
|
2021-02-19 06:37:22 +00:00
|
|
|
path: assets/screenshots
|