Add tests as a Docker build step to ensure no container with failing tests can be published
Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
@@ -3,6 +3,8 @@ WORKDIR /usr/src/app
|
||||
COPY ./package*.json ./
|
||||
RUN npm i
|
||||
COPY . .
|
||||
# Ideally the tests should be run separately in a CI/CD workflow rather than during the build
|
||||
RUN npm run test
|
||||
RUN npm run build
|
||||
|
||||
FROM node:20-slim
|
||||
|
||||
Reference in New Issue
Block a user