Skip to content

Commit

Permalink
Add swagger-valid make task and travis step. Closes #501.
Browse files Browse the repository at this point in the history
  • Loading branch information
chambridge committed Jan 25, 2018
1 parent 69a4fd3 commit 078be3f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@
Dockerfile
client
quipucords/db.sqlite3
node_modules
package-lock.json
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,6 @@ migrations/
# Facts
raw_facts/

# node
node_modules
package-lock.json
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@ python:
install:
- pip install -r requirements.txt
- pip install coveralls
- nvm install node
- npm install swagger-cli
# command to run tests
script:
- make build
- make lint
- make server-init
- make test-coverage
- make swagger-valid
after_success:
- coveralls
notifications:
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ help:
@echo " lint-pylint to run the pylint linter"
@echo " test to run unit tests"
@echo " test-coverage to run unit tests and measure test coverage"
@echo " swagger-valid to run swagger-cli validation"
@echo " server-init to run server initializion steps"
@echo " serve to run the server"
@echo " manpage to build the manpage"
@echo " manpage-html to build the manpage"

all: build lint test-coverage

Expand All @@ -47,6 +49,9 @@ test-coverage:
QPC_DISABLE_AUTHENTICATION=True coverage run --source=quipucords/,qpc/ quipucords/manage.py test -v 2 quipucords/ qpc/
coverage report -m --omit $(OMIT_PATTERNS)

swagger-valid:
node_modules/swagger-cli/bin/swagger-cli.js validate docs/swagger.yml

lint-flake8:
flake8 . --ignore D203 --exclude quipucords/api/migrations,docs,build,.vscode,client,venv

Expand Down

0 comments on commit 078be3f

Please sign in to comment.