Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add test-docker rule #73

Merged
merged 2 commits into from
Aug 11, 2022
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
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