[CI] Simplify coverage Dockerfile (#1583)

Instead of mocking the index.html and openapi.yml copy the actual files across.
This commit is contained in:
Amir Zarrinkafsh 2021-01-05 13:35:04 +11:00 committed by GitHub
parent 079d069cd6
commit 40f13166c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,8 +7,7 @@ WORKDIR /node/src/app
COPY web .
# Install the dependencies and build
RUN yarn install --frozen-lockfile && INLINE_RUNTIME_CHUNK=false yarn coverage && \
mkdir -p /node/src/app/build/api && cd /node/src/app/build/api/ && touch index.html openapi.yml
RUN yarn install --frozen-lockfile && INLINE_RUNTIME_CHUNK=false yarn coverage
# =======================================
# ===== Build image for the backend =====
@ -25,6 +24,7 @@ WORKDIR /go/src/app
COPY go.mod go.sum config.template.yml ./
COPY --from=builder-frontend /node/src/app/build public_html
COPY api public_html/api
RUN go mod download