mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 14:56:01 +00:00
137 lines
3.8 KiB
YAML
137 lines
3.8 KiB
YAML
# --------------------------------------------------------------------------------------------
|
|
# This file is generated. Do not edit manually
|
|
# --------------------------------------------------------------------------------------------
|
|
name: Cypress tests with screenshots PREMIUM
|
|
'on':
|
|
push:
|
|
branches:
|
|
- master
|
|
- develop
|
|
- feature/**
|
|
- hotfix/**
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
jobs:
|
|
e2e-tests:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Use Node.js 22.x
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 22.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
|
|
ref: 4401bfe2a52019448fd14a999eb26bc4e7b5341f
|
|
- 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: ls -R
|
|
run: |
|
|
cd ../dbgate-merged
|
|
ls -R
|
|
- name: Copy screenshots
|
|
run: |
|
|
mkdir screenshots
|
|
cp ../dbgate-merged/e2e-tests/screenshots/*.png screenshots/
|
|
- name: Upload E2E screenshots
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: screenshots
|
|
path: screenshots
|
|
- name: Push E2E screenshots
|
|
if: ${{ github.ref_name == 'master' }}
|
|
run: |
|
|
git config --global user.email "info@dbgate.info"
|
|
git config --global user.name "GitHub Actions"
|
|
git clone https://${{ secrets.DIFLOW_GIT_SECRET }}@github.com/dbgate/dbgate-img.git
|
|
cp ../dbgate-merged/e2e-tests/screenshots/*.png dbgate-img/static/img
|
|
cd dbgate-img/static/img
|
|
git add .
|
|
git commit --amend --no-edit
|
|
git push --force
|
|
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:
|
|
- '16012: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'
|
|
mongo:
|
|
image: mongo:4.4.29
|
|
env:
|
|
MONGO_INITDB_ROOT_USERNAME: root
|
|
MONGO_INITDB_ROOT_PASSWORD: Pwd2020Db
|
|
ports:
|
|
- '16010:27017'
|
|
redis:
|
|
image: redis
|
|
ports:
|
|
- '16011:6379'
|
|
mssql:
|
|
image: mcr.microsoft.com/mssql/server
|
|
ports:
|
|
- '16014:1433'
|
|
env:
|
|
ACCEPT_EULA: 'Y'
|
|
SA_PASSWORD: Pwd2020Db
|
|
MSSQL_PID: Express
|
|
oracle:
|
|
image: gvenzl/oracle-xe:21-slim
|
|
env:
|
|
ORACLE_PASSWORD: Pwd2020Db
|
|
ports:
|
|
- '16013:1521'
|