Skip to content

Commit

Permalink
test: add test-docker rule (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bilal Boussayoud committed Aug 11, 2022
1 parent 7cca12e commit fdd5828
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM node:16

RUN mkdir /twilio
WORKDIR /twilio

ENV NODE_PATH /usr/local/lib/node_modules

COPY spec ./spec
COPY package* ./
COPY spectral.yaml .

RUN npm install . --include=dev
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: spectral install test clean
.PHONY: spectral install test test-docker clean

install:
npm install
Expand All @@ -8,6 +8,10 @@ spectral: install

test: spectral

test-docker:
docker build -t twilio/twilio-oai .
docker run twilio/twilio-oai ./node_modules/.bin/spectral lint spec/json/twilio_*.json -Dq

clean:
rm -f package-lock.json
rm -rf node_modules

0 comments on commit fdd5828

Please sign in to comment.