mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-24 18:45:59 +00:00
e2e tests
This commit is contained in:
12
.github/workflows/e2e-tests.yaml
vendored
12
.github/workflows/e2e-tests.yaml
vendored
@@ -12,6 +12,9 @@ jobs:
|
||||
container: node:18
|
||||
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
apt-get install libgtk2.0-0t64 libgtk-3-0t64 libgbm-dev libnotify-dev libnss3 libxss1 libasound2t64 libxtst6 xauth xvfb
|
||||
- name: Context
|
||||
env:
|
||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||
@@ -26,13 +29,10 @@ jobs:
|
||||
uses: cypress-io/github-action@v6
|
||||
with:
|
||||
build: yarn prepare:packer
|
||||
start: node packer/build/bundle.js --listen-api
|
||||
start: node packer/build/bundle.js --listen-api --static-dir packer/build/public
|
||||
with:
|
||||
project: ./e2e-tests
|
||||
|
||||
- name: Cypress run
|
||||
uses: cypress-io/github-action@v6
|
||||
with:
|
||||
build: npm run build
|
||||
start: npm start
|
||||
|
||||
services:
|
||||
mysql:
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
"cypress": "^13.16.1"
|
||||
},
|
||||
"scripts": {
|
||||
"cy:open": "cypress open"
|
||||
"cy:open": "cypress open",
|
||||
"cy:run": "cypress run"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ const files = require('./controllers/files');
|
||||
const scheduler = require('./controllers/scheduler');
|
||||
const queryHistory = require('./controllers/queryHistory');
|
||||
const onFinished = require('on-finished');
|
||||
const processArgs = require('./utility/processArgs');
|
||||
|
||||
const { rundir } = require('./utility/directories');
|
||||
const platformInfo = require('./utility/platformInfo');
|
||||
@@ -77,6 +78,8 @@ function start() {
|
||||
app.use(getExpressPath('/'), express.static('/home/dbgate-docker/public'));
|
||||
} else if (platformInfo.isAwsUbuntuLayout) {
|
||||
app.use(getExpressPath('/'), express.static('/home/ubuntu/build/public'));
|
||||
} else if (processArgs.staticDir) {
|
||||
app.use(getExpressPath('/'), express.static(processArgs.staticDir));
|
||||
} else if (platformInfo.isNpmDist) {
|
||||
app.use(
|
||||
getExpressPath('/'),
|
||||
|
||||
@@ -14,6 +14,7 @@ const workspaceDir = getNamedArg('--workspace-dir');
|
||||
const processDisplayName = getNamedArg('--process-display-name');
|
||||
const listenApi = process.argv.includes('--listen-api');
|
||||
const listenApiChild = process.argv.includes('--listen-api-child') || listenApi;
|
||||
const staticDir = getNamedArg('--static-dir');
|
||||
|
||||
function getPassArgs() {
|
||||
const res = [];
|
||||
@@ -36,4 +37,5 @@ module.exports = {
|
||||
listenApi,
|
||||
listenApiChild,
|
||||
processDisplayName,
|
||||
staticDir,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user