Mocked tests and remove ncc compilation (#32)
* Mocked tests and remove ncc compilation * Update workflow.yml * Update Dockerfile
This commit is contained in:
16
Dockerfile
16
Dockerfile
@@ -1,11 +1,11 @@
|
||||
# Base image
|
||||
FROM node:15-buster-slim
|
||||
|
||||
# Copy GitHub action
|
||||
COPY action/dist/index.js /index.js
|
||||
# Copy repository
|
||||
COPY . /metrics
|
||||
|
||||
# Setup
|
||||
RUN chmod +x /index.js \
|
||||
RUN chmod +x /metrics/action/index.mjs \
|
||||
# Install latest chrome dev package, fonts to support major charsets and skip chromium download on puppeteer install
|
||||
# Based on https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#running-puppeteer-in-docker
|
||||
&& apt-get update \
|
||||
@@ -21,9 +21,15 @@ RUN chmod +x /index.js \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y ruby-full \
|
||||
&& apt-get install -y git g++ cmake pkg-config libicu-dev zlib1g-dev libcurl4-openssl-dev libssl-dev ruby-dev \
|
||||
&& gem install github-linguist
|
||||
&& gem install github-linguist \
|
||||
# Install python for node-gyp
|
||||
&& apt-get update \
|
||||
&& apt-get install -y python3 \
|
||||
# Install node modules
|
||||
&& cd /metrics \
|
||||
&& npm ci
|
||||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
|
||||
ENV PUPPETEER_BROWSER_PATH "google-chrome-stable"
|
||||
|
||||
# Execute GitHub action
|
||||
ENTRYPOINT node /index.js
|
||||
ENTRYPOINT node /metrics/action/index.mjs
|
||||
Reference in New Issue
Block a user