Skip to content
This repository has been archived by the owner on Dec 27, 2020. It is now read-only.

Add CI pipeline to run unit tests #1

Merged
merged 4 commits into from
May 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Node.js dependencies
node_modules
example
24 changes: 24 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
kind: pipeline
name: default

steps:
- name: run tests
image: docker
commands:
- docker build -t test -f Dockerfile-test .
- docker run test
volumes:
- name: docker
path: /var/run/docker.sock
when:
branch:
- master
event:
- pull_request
volumes:
- name: docker
host:
path: /var/run/docker.sock
- name: frontend-dep
host:
path: /drone/fluent/frontend-dep
17 changes: 17 additions & 0 deletions Dockerfile-test
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM node:12.11.1-alpine

WORKDIR /web

# Install tools
RUN apk add --no-cache git
RUN apk add --no-cache bash

# Install dependencies
COPY package.json yarn.lock ./
RUN yarn

COPY . .

ENV CI=true

CMD ["yarn", "test:unit", "--passWithNoTests"]