Running tests in docker build

This commit is contained in:
simojenki
2021-03-17 12:47:24 +11:00
parent 5ee9dd5d5b
commit 3e18a2d751
2 changed files with 8 additions and 6 deletions

View File

@@ -2,15 +2,17 @@ FROM node:14.15-alpine as build
WORKDIR /bonob
COPY src .
# COPY tests .
# COPY jest.config.js .
COPY src ./src
COPY web ./web
COPY tests ./tests
COPY jest.config.js .
COPY package.json .
# COPY register.js .
COPY register.js .
COPY tsconfig.json .
COPY yarn.lock .
RUN yarn install && \
yarn test --no-cache && \
yarn build
@@ -23,7 +25,7 @@ WORKDIR /bonob
COPY package.json .
COPY yarn.lock .
COPY --from=build /bonob/build/* ./
COPY --from=build /bonob/build/src/* ./
COPY web web
COPY src/Sonoswsdl-1.19.4-20190411.142401-3.wsdl /bonob/Sonoswsdl-1.19.4-20190411.142401-3.wsdl

View File

@@ -10,7 +10,7 @@ import { InMemoryMusicService } from "./in_memory_music_service";
const WEB_ADDRESS = "http://localhost:1234"
const bonob = bonobService("bonob-test", 247, WEB_ADDRESS, 'Anonymous');
const app = server(sonos("disabled"), bonob, WEB_ADDRESS, new InMemoryMusicService());
const app = server(sonos(false), bonob, WEB_ADDRESS, new InMemoryMusicService());
getPort().then((port) => {
logger.debug(`Starting on port ${port}`);