refs #5739 feat: start docker test front and e2e
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
593b58134e
commit
61fa3a62db
|
@ -23,7 +23,7 @@ services:
|
|||
front:
|
||||
image: front
|
||||
restart: always
|
||||
command: ["npm", "run", "test:front:ci"]
|
||||
command: ["npx", "jest", "--ci --maxWorkers=2"]
|
||||
build:
|
||||
context: .
|
||||
dockerfile: front/Dockerfile.test
|
||||
|
@ -40,8 +40,18 @@ services:
|
|||
- NODE_ENV
|
||||
depends_on:
|
||||
- db
|
||||
e2e:
|
||||
image: e2e
|
||||
restart: always
|
||||
build:
|
||||
context: .
|
||||
dockerfile: e2e/Dockerfile
|
||||
environment:
|
||||
- NODE_ENV
|
||||
depends_on:
|
||||
- front
|
||||
|
||||
networks:
|
||||
stack-network:
|
||||
driver: host
|
||||
# networks:
|
||||
# stack-network:
|
||||
# driver: host
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
FROM front
|
||||
WORKDIR /salix
|
||||
COPY e2e e2e
|
||||
|
||||
CMD ["node", "e2e/helpers/tests.js"]
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
module.exports = {
|
||||
url: 'http://localhost:5000'
|
||||
url: 'http://back:5000'
|
||||
};
|
||||
|
|
|
@ -4,7 +4,7 @@ require('regenerator-runtime/runtime');
|
|||
require('vn-loopback/server/boot/date')();
|
||||
|
||||
const axios = require('axios');
|
||||
const Docker = require('../../db/docker.js');
|
||||
// const Docker = require('../../db/docker.js');
|
||||
const e2eConfig = require('./config.js');
|
||||
const log = require('fancy-log');
|
||||
|
||||
|
@ -18,9 +18,9 @@ async function test() {
|
|||
if (process.argv[2] === 'show')
|
||||
process.env.E2E_SHOW = true;
|
||||
|
||||
const container = new Docker('salix-db');
|
||||
// const container = new Docker('salix-db');
|
||||
|
||||
await container.run();
|
||||
// await container.run();
|
||||
|
||||
const Jasmine = require('jasmine');
|
||||
const jasmine = new Jasmine();
|
||||
|
@ -56,7 +56,7 @@ async function test() {
|
|||
}
|
||||
|
||||
async function backendStatus() {
|
||||
log('Awaiting backend connection...');
|
||||
log('Awaiting backend connection2...');
|
||||
|
||||
const milliseconds = 1000;
|
||||
const maxAttempts = 10;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
FROM back
|
||||
EXPOSE 5000
|
||||
WORKDIR /salix
|
||||
|
||||
COPY front front
|
||||
RUN npm i -g jest
|
||||
|
@ -13,6 +14,7 @@ COPY fileMock.js ./
|
|||
|
||||
COPY /front/gulpfile.js ./
|
||||
COPY /front/webpack.config.js ./
|
||||
|
||||
COPY /front/salix ./front/salix
|
||||
COPY /front/core ./front/core
|
||||
|
||||
CMD ["npx", "gulp", "front"]
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
docker-compose -p salix-test -f docker-compose.test.yml build --force-rm db
|
||||
docker-compose -p salix-test -f docker-compose.test.yml build --force-rm back
|
||||
docker-compose -p salix-test -f docker-compose.test.yml build --force-rm front
|
||||
docker-compose -p salix-test -f docker-compose.test.yml build --force-rm e2e
|
||||
docker-compose -p salix-test -f docker-compose.test.yml run e2e #--rm
|
||||
# docker-compose -p salix-test -f docker-compose.test.yml down
|
||||
# docker-compose -p salix-test -f docker-compose.test.yml rm
|
|
@ -1,3 +1,4 @@
|
|||
docker-compose -p salix-test -f docker-compose.test.yml build --force-rm front
|
||||
docker-compose -p salix-test -f docker-compose.test.yml run --rm front
|
||||
docker-compose -p salix-test -f docker-compose.test.yml down
|
||||
docker-compose -p salix-test -f docker-compose.test.yml rm
|
Loading…
Reference in New Issue