mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-29 23:53:57 +00:00
screenshots action
This commit is contained in:
87
.github/workflows/run-tests-pro.yaml
vendored
Normal file
87
.github/workflows/run-tests-pro.yaml
vendored
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
# --------------------------------------------------------------------------------------------
|
||||||
|
# This file is generated. Do not edit manually
|
||||||
|
# --------------------------------------------------------------------------------------------
|
||||||
|
name: Run tests with screesnhots PREMIUM
|
||||||
|
'on':
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- develop
|
||||||
|
- feature/**
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Use Node.js 18.x
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 18.x
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
- name: Checkout dbgate/dbgate-pro
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
repository: dbgate/dbgate-pro
|
||||||
|
token: '${{ secrets.GH_TOKEN }}'
|
||||||
|
path: dbgate-pro
|
||||||
|
- name: Merge dbgate/dbgate-pro
|
||||||
|
run: |
|
||||||
|
mkdir ../dbgate-pro
|
||||||
|
mv dbgate-pro/* ../dbgate-pro/
|
||||||
|
cd ..
|
||||||
|
mkdir dbgate-merged
|
||||||
|
cd dbgate-pro
|
||||||
|
cd sync
|
||||||
|
yarn
|
||||||
|
node sync.js --nowatch
|
||||||
|
cd ..
|
||||||
|
- name: yarn install
|
||||||
|
run: |
|
||||||
|
cd ../dbgate-merged
|
||||||
|
yarn install
|
||||||
|
- name: Build packer dist for cypress
|
||||||
|
run: |
|
||||||
|
cd ../dbgate-merged
|
||||||
|
yarn prepare:packer
|
||||||
|
- name: yarn install cypress
|
||||||
|
run: |
|
||||||
|
cd ../dbgate-merged
|
||||||
|
cd e2e-tests
|
||||||
|
yarn install
|
||||||
|
- name: Run Cypress tests
|
||||||
|
run: |
|
||||||
|
cd ../dbgate-merged
|
||||||
|
cd e2e-tests
|
||||||
|
yarn test:ci
|
||||||
|
- name: Upload E2E screenshots
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: e2e-screenshots
|
||||||
|
path: ../dbgate-merged/e2e-tests/cypress/screenshots
|
||||||
|
services:
|
||||||
|
postgres-cypress:
|
||||||
|
image: postgres
|
||||||
|
options: '--health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5'
|
||||||
|
env:
|
||||||
|
POSTGRES_PASSWORD: Pwd2020Db
|
||||||
|
ports:
|
||||||
|
- '16000:5432'
|
||||||
|
mysql-cypress:
|
||||||
|
image: 'mysql:8.0.18'
|
||||||
|
ports:
|
||||||
|
- '16004:3306'
|
||||||
|
env:
|
||||||
|
MYSQL_ROOT_PASSWORD: Pwd2020Db
|
||||||
|
mysql-ssh-login:
|
||||||
|
image: 'ghcr.io/dbgate/mysql-ssh-login:latest'
|
||||||
|
ports:
|
||||||
|
- '16006:22'
|
||||||
|
mysql-ssh-keyfile:
|
||||||
|
image: 'ghcr.io/dbgate/mysql-ssh-keyfile:latest'
|
||||||
|
ports:
|
||||||
|
- '16008:22'
|
||||||
|
dex:
|
||||||
|
image: 'ghcr.io/dbgate/dex:latest'
|
||||||
|
ports:
|
||||||
|
- '16009:5556'
|
||||||
@@ -22,6 +22,7 @@ describe('Add connection', () => {
|
|||||||
// save and connect
|
// save and connect
|
||||||
cy.get('[data-testid=ConnectionTab_buttonSave]').click();
|
cy.get('[data-testid=ConnectionTab_buttonSave]').click();
|
||||||
cy.get('[data-testid=ConnectionTab_buttonConnect]').click();
|
cy.get('[data-testid=ConnectionTab_buttonConnect]').click();
|
||||||
|
cy.screenshot('add-connection');
|
||||||
cy.contains('performance_schema');
|
cy.contains('performance_schema');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -45,6 +46,7 @@ describe('Add connection', () => {
|
|||||||
cy.get('[data-testid=ConnectionSshTunnelFields_sshLogin]').clear().type('root');
|
cy.get('[data-testid=ConnectionSshTunnelFields_sshLogin]').clear().type('root');
|
||||||
cy.get('[data-testid=ConnectionSshTunnelFields_sshPassword]').clear().type('root');
|
cy.get('[data-testid=ConnectionSshTunnelFields_sshPassword]').clear().type('root');
|
||||||
cy.get('[data-testid=ConnectionSshTunnelFields_sshPort]').clear().type('16006');
|
cy.get('[data-testid=ConnectionSshTunnelFields_sshPort]').clear().type('16006');
|
||||||
|
cy.screenshot('ssh-tunnel-connection');
|
||||||
cy.get('[data-testid=ConnectionTab_buttonSave]').click();
|
cy.get('[data-testid=ConnectionTab_buttonSave]').click();
|
||||||
cy.get('[data-testid=ConnectionTab_buttonConnect]').click();
|
cy.get('[data-testid=ConnectionTab_buttonConnect]').click();
|
||||||
cy.contains('performance_schema');
|
cy.contains('performance_schema');
|
||||||
|
|||||||
@@ -35,24 +35,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: latest
|
version: latest
|
||||||
|
|
||||||
- name: Checkout dbgate/dbgate-pro
|
- _include: checkout-and-merge-pro
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
repository: dbgate/dbgate-pro
|
|
||||||
token: ${{ secrets.GH_TOKEN }}
|
|
||||||
path: dbgate-pro
|
|
||||||
|
|
||||||
- name: Merge dbgate/dbgate-pro
|
|
||||||
run: |
|
|
||||||
mkdir ../dbgate-pro
|
|
||||||
mv dbgate-pro/* ../dbgate-pro/
|
|
||||||
cd ..
|
|
||||||
mkdir dbgate-merged
|
|
||||||
cd dbgate-pro
|
|
||||||
cd sync
|
|
||||||
yarn
|
|
||||||
node sync.js --nowatch
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
- name: adjustPackageJson
|
- name: adjustPackageJson
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
87
workflow-templates/run-tests-pro.yaml
Normal file
87
workflow-templates/run-tests-pro.yaml
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
name: Run tests with screesnhots PREMIUM
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- develop
|
||||||
|
- 'feature/**'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Use Node.js 18.x
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 18.x
|
||||||
|
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
|
||||||
|
- _include: checkout-and-merge-pro
|
||||||
|
|
||||||
|
- name: yarn install
|
||||||
|
run: |
|
||||||
|
cd ../dbgate-merged
|
||||||
|
yarn install
|
||||||
|
|
||||||
|
- name: Build packer dist for cypress
|
||||||
|
run: |
|
||||||
|
cd ../dbgate-merged
|
||||||
|
yarn prepare:packer
|
||||||
|
|
||||||
|
- name: yarn install cypress
|
||||||
|
run: |
|
||||||
|
cd ../dbgate-merged
|
||||||
|
cd e2e-tests
|
||||||
|
yarn install
|
||||||
|
|
||||||
|
- name: Run Cypress tests
|
||||||
|
run: |
|
||||||
|
cd ../dbgate-merged
|
||||||
|
cd e2e-tests
|
||||||
|
yarn test:ci
|
||||||
|
|
||||||
|
- name: Upload E2E screenshots
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: e2e-screenshots
|
||||||
|
path: ../dbgate-merged/e2e-tests/cypress/screenshots
|
||||||
|
|
||||||
|
services:
|
||||||
|
postgres-cypress:
|
||||||
|
image: postgres
|
||||||
|
options: >-
|
||||||
|
--health-cmd pg_isready
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 5
|
||||||
|
env:
|
||||||
|
POSTGRES_PASSWORD: Pwd2020Db
|
||||||
|
ports:
|
||||||
|
- 16000:5432
|
||||||
|
|
||||||
|
mysql-cypress:
|
||||||
|
image: mysql:8.0.18
|
||||||
|
ports:
|
||||||
|
- 16004:3306
|
||||||
|
env:
|
||||||
|
MYSQL_ROOT_PASSWORD: Pwd2020Db
|
||||||
|
|
||||||
|
mysql-ssh-login:
|
||||||
|
image: ghcr.io/dbgate/mysql-ssh-login:latest
|
||||||
|
ports:
|
||||||
|
- '16006:22'
|
||||||
|
|
||||||
|
mysql-ssh-keyfile:
|
||||||
|
image: ghcr.io/dbgate/mysql-ssh-keyfile:latest
|
||||||
|
ports:
|
||||||
|
- '16008:22'
|
||||||
|
|
||||||
|
dex:
|
||||||
|
image: ghcr.io/dbgate/dex:latest
|
||||||
|
ports:
|
||||||
|
- 16009:5556
|
||||||
Reference in New Issue
Block a user