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

Update CircleCI workflow #20

Merged
merged 1 commit into from
Jan 31, 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
31 changes: 10 additions & 21 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,20 @@
version: 2.1
orbs:
heroku: circleci/heroku@0.0.8
workflows:
test_and_deploy:
integration_tests:
jobs:
- test
# Master is deployed to the staging app in a Heroku pipeline.
- deploy_staging:
requires:
- test
filters:
branches:
only:
- master

jobs:
test:
docker:
- image: circleci/node:12.5.0
- image: circleci/node:13
- image: circleci/mongo:4.2.2

working_directory: ~/quotable

environment:
MONGODB_URI: mongodb://localhost:27017/test

steps:
- checkout

Expand All @@ -40,19 +34,14 @@ jobs:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}

- run:
name: Seeding database
command: npm run -s database:seed data/sample

- run:
name: Running ESLint
command: npm run lint

- run:
name: Running tests
command: npm run test

# Deploys the branch to the staging app in a Heroku Pipeline
deploy_staging:
executor: heroku/default
steps:
- checkout
- heroku/install
- heroku/deploy-via-git:
app-name: 'quotable-api-staging'
244 changes: 244 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,19 @@
},
"devDependencies": {
"babel-eslint": "^10.0.3",
"cli-table3": "^0.5.1",
"eslint": "^5.16.0",
"eslint-config-airbnb": "^17.1.1",
"eslint-config-prettier": "^4.3.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.14.3",
"husky": "^2.4.1",
"is-interactive": "^1.0.0",
"jest": "^24.9.0",
"lint-staged": "^8.2.1",
"nodemon": "^1.19.2",
"ora": "^4.0.3",
"prettier": "^1.18.2",
"shelljs": "^0.8.3",
"supertest": "^4.0.2"
Expand Down
Loading