mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
refactor: run test on build Docker image
This commit is contained in:
parent
0c9e504d1a
commit
fd2eeea4dd
3 changed files with 13 additions and 7 deletions
|
@ -12,9 +12,9 @@
|
|||
!.eslintrc
|
||||
!.eslintignore
|
||||
!.stylelintrc
|
||||
|
||||
# not going to run tests inside the docker container
|
||||
test/
|
||||
!.flowconfig
|
||||
!.jest.config.js
|
||||
!.jestEnvironment.js
|
||||
|
||||
# do not copy over node_modules we will run `npm install` anyway
|
||||
node_modules
|
||||
|
|
10
Dockerfile
10
Dockerfile
|
@ -4,7 +4,11 @@ LABEL maintainer="https://github.com/verdaccio/verdaccio"
|
|||
RUN apk --no-cache add openssl && \
|
||||
wget -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64 && \
|
||||
chmod +x /usr/local/bin/dumb-init && \
|
||||
apk del openssl
|
||||
apk del openssl && \
|
||||
apk --no-cache add ca-certificates wget && \
|
||||
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://raw.githubusercontent.com/sgerrand/alpine-pkg-glibc/master/sgerrand.rsa.pub && \
|
||||
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.25-r0/glibc-2.25-r0.apk && \
|
||||
apk add glibc-2.25-r0.apk
|
||||
|
||||
ENV APPDIR /usr/local/app
|
||||
|
||||
|
@ -16,9 +20,11 @@ ENV NODE_ENV=production
|
|||
|
||||
RUN npm config set registry http://registry.npmjs.org/ && \
|
||||
npm install -g -s --no-progress yarn@0.28.4 --pure-lockfile && \
|
||||
npm install -g -s flow-bin && \
|
||||
yarn install --production=false && \
|
||||
yarn run lint && \
|
||||
yarn run test && \
|
||||
yarn run build:webui && \
|
||||
yarn run code:build && \
|
||||
yarn cache clean && \
|
||||
yarn install --production=true --pure-lockfile
|
||||
|
||||
|
|
|
@ -137,14 +137,14 @@
|
|||
"prepublish": "in-publish && npm run build:webui || not-in-publish",
|
||||
"flow": "flow",
|
||||
"pretest": "npm run code:build",
|
||||
"test": "cross-env jest",
|
||||
"test": "cross-env BABEL_ENV=test jest",
|
||||
"pre:ci": "npm run build:webui",
|
||||
"coverage:publish": "codecov",
|
||||
"lint": "npm run flow && eslint .",
|
||||
"lint:css": "stylelint 'src/**/*.scss' --syntax scss",
|
||||
"dev:start": "cross-env BABEL_ENV=registry babel-node src/lib/cli",
|
||||
"code:build": "cross-env BABEL_ENV=registry babel src/ --out-dir build/ --ignore src/webui/ --copy-files",
|
||||
"pre:webpack": "npm run lint && rimraf static/*",
|
||||
"pre:webpack": "rimraf static/*",
|
||||
"dev:webui": "cross-env BABEL_ENV=ui babel-node tools/dev.server.js",
|
||||
"build:webui": "npm run pre:webpack && BABEL_ENV=ui webpack --config tools/webpack.prod.config.babel.js",
|
||||
"build:docker": "docker build -t verdaccio . --no-cache",
|
||||
|
|
Loading…
Reference in a new issue