Mocked tests and remove ncc compilation (#32)

* Mocked tests and remove ncc compilation
* Update workflow.yml
* Update Dockerfile
This commit is contained in:
Simon Lecoq
2020-12-30 00:49:01 +01:00
committed by GitHub
parent 03bede5482
commit b4d0e85148
22 changed files with 6534 additions and 1263 deletions

View File

@@ -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