mirror of https://github.com/thumbsup/thumbsup
Run full integration tests inside Docker. Travis runs unit + integration.
parent
9a2da3e5ea
commit
208f0f0212
@ -1 +1,2 @@
|
||||
node_modules
|
||||
test-integration/output-actual
|
||||
|
@ -1,5 +1,19 @@
|
||||
# Run unit tests on several versions of Node
|
||||
language: node_js
|
||||
node_js:
|
||||
- '6'
|
||||
- '8'
|
||||
script: scripts/cibuild
|
||||
|
||||
# Also require docker for the integration tests
|
||||
sudo: required
|
||||
services:
|
||||
- docker
|
||||
|
||||
jobs:
|
||||
include:
|
||||
# After unit tests pass on all version of Node
|
||||
# run the integration tests
|
||||
- stage: Integration tests
|
||||
script:
|
||||
- docker pull thumbsupgallery/build:alpine
|
||||
- docker build .
|
||||
|
@ -1,13 +1,10 @@
|
||||
# Node.js runtime
|
||||
FROM node:8-alpine
|
||||
# Node.js + build depdencies + runtime dependencies
|
||||
FROM thumbsupgallery/build:alpine
|
||||
|
||||
# Cache all the binary dependencies first
|
||||
RUN apk add --update ffmpeg graphicsmagick exiftool
|
||||
# Install and cache dependencies
|
||||
COPY package.json /app
|
||||
RUN npm install
|
||||
|
||||
# Install thumbsup globally
|
||||
ARG THUMBSUP_VERSION=2.x.x
|
||||
RUN npm install -g thumbsup@${THUMBSUP_VERSION}
|
||||
|
||||
# Default command is thumbsup itself, so we can run
|
||||
# > docker run thumbsupgallery/thumbsup --input [...] --output [...]
|
||||
CMD ["thumbsup"]
|
||||
# Run the tests
|
||||
COPY . /app
|
||||
RUN scripts/cibuild
|
||||
|
Loading…
Reference in New Issue