Skip to content

Commit

Permalink
Merge pull request #60 from intuit/automation
Browse files Browse the repository at this point in the history
more robust CI + add auto
  • Loading branch information
hipstersmoothie committed Aug 17, 2019
2 parents fa03dde + 66925b4 commit 4e5f12e
Show file tree
Hide file tree
Showing 6 changed files with 114 additions and 30 deletions.
104 changes: 86 additions & 18 deletions .circleci/config.yml
@@ -1,29 +1,97 @@
# Javascript Node CircleCI 2.0 configuration file
#

version: 2
jobs:
build:
docker:
- image: circleci/node:11.0.0

working_directory: ~/standardly
defaults: &defaults
working_directory: ~/standardly
docker:
- image: circleci/node:latest-browsers

jobs:
install:
<<: *defaults
steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run: npm install

# Find a cache corresponding to this specific package.json checksum
# when this file is changed, this key will fail
- standardly-{{ .Branch }}-{{ checksum "package-lock.json" }}-{{ checksum ".circleci/config.yml" }}
- standardly-{{ .Branch }}-{{ checksum "package-lock.json" }}
- standardly-{{ .Branch }}
# Find the most recent cache used from any branch
- standardly-master
- standardly-
- run:
name: Install Dependencies
command: yarn install --frozen-lockfile
- save_cache:
key: standardly-{{ .Branch }}-{{ checksum "package-lock.json" }}-{{ checksum ".circleci/config.yml" }}
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
- ~/.cache/yarn
- persist_to_workspace:
root: .
paths:
- .

test:
<<: *defaults
steps:
- attach_workspace:
at: ~/standardly
- run:
name: Test
command: yarn test

lint:
<<: *defaults
steps:
- attach_workspace:
at: ~/standardly
- run:
name: Lint
command: yarn lint

# integration:
# <<: *defaults
# steps:
# - attach_workspace:
# at: ~/standardly
# - run:
# name: Integration Tests
# command: yarn test:integration

release:
<<: *defaults
steps:
- attach_workspace:
at: ~/standardly
- run: mkdir ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
- run:
name: Release
command: yarn release

workflows:
version: 2
build_and_test:
jobs:
- install

- test:
requires:
- install

- lint:
requires:
- install

# run tests!
- run: npm test
# - integration:
# requires:
# - install

- release:
requires:
- lint
- test
# - integration

2 changes: 1 addition & 1 deletion .github/code_of_conduct.md
@@ -1,2 +1,2 @@
Thank you for considering contributing your time and brilliance to standardly.
Thank you for considering contributing your time and brilliance to standardly.
At Intuit, we take our open source code of conduct seriously. Please take a moment to read our [code of conduct](https://opensource.intuit.com/#coc) before you create any pull request or issue.
4 changes: 3 additions & 1 deletion .github/issue_template/bug_template.md
Expand Up @@ -3,6 +3,7 @@ Before you submit an issue, ensure that the issue is not already found in this l
If you are absolutely sure that this issue isnt already open, clearly describe the problem providing the reason why you believe it needs to be solved. If this is a bug please include steps to reproduce the bug, including logs / screenshots as appropriate

---

name: Bug Report
about: Sorry that you are facing a problem. Thank you for helping us keep those pesky bugs off!
title: ''
Expand All @@ -24,6 +25,7 @@ assignees: ''
<!-- A clear and concise description of what you expected to happen -->

**Log or report files**

<!-- If applicable, add log messages or the result.csv from the reports folder -->

**Screenshots**
Expand All @@ -32,7 +34,7 @@ assignees: ''

**Desktop (please complete the following information):**

- OS:
- OS:
- node version:
- npm version:
- version of this module:
Expand Down
3 changes: 2 additions & 1 deletion .github/issue_template/feature_req_template.md
@@ -1,8 +1,9 @@
Before you submit an issue, ensure that the issue is not already found in this list.

If you are absolutely sure that this issue isnt already open, clearly describe the problem providing the reason why you believe it needs to be solved. If this is a bug please include steps to reproduce the bug, including logs / screenshots as appropriate
If you are absolutely sure that this issue isn't already open, clearly describe the problem providing the reason why you believe it needs to be solved. If this is a bug please include steps to reproduce the bug, including logs / screenshots as appropriate

---

name: Feature Request
about: You have an idea? We are all ears!
title: ''
Expand Down
6 changes: 2 additions & 4 deletions .github/pull_request_template.md
@@ -1,4 +1,3 @@

<!-- In order to have your PR be successfully merged, please ensure the following before submitting your PR -->

**Description**
Expand All @@ -9,10 +8,9 @@

<!-- Why are you making the change. Add a link to the issue id. PRs without an issue number could be ignored or rejected by the reviewers -->

Check the following:

Check the following:
- [ ] The PR is not huge (it has less than a few files, and very few lines of change overall)
- [ ] Proper tests are added/updated
- [ ] All tests pass and there are no merge conflicts

<!-- Once your PR is submitted, please note that it could take up to 3 business days to get a response -->
<!-- Once your PR is submitted, please note that it could take up to 3 business days to get a response -->
25 changes: 20 additions & 5 deletions package.json
@@ -1,5 +1,5 @@
{
"name": "standardly",
"name": "@intuit/standardly",
"version": "0.1.0",
"description": "DIY framework for Standards Governance",
"main": "index.js",
Expand All @@ -9,7 +9,8 @@
"scripts": {
"test": "nyc --reporter=cobertura mocha './test/unit/*.js'",
"test:integration": "mocha './test/integration/*.js'",
"lint": "node_modules/.bin/eslint ."
"lint": "node_modules/.bin/eslint src test",
"release": "auto shipit"
},
"repository": {
"type": "git",
Expand All @@ -20,7 +21,7 @@
"governance",
"compliance"
],
"author": "",
"author": "Andrew Lisowski <lisowski54@gmail.com>",
"license": "Apache-2.0",
"dependencies": {
"app-root-path": "2.1.0",
Expand All @@ -35,25 +36,39 @@
"request": "2.88.0"
},
"devDependencies": {
"auto": "^7.3.0",
"babel-eslint": "^10.0.2",
"chai": "4.2.0",
"chai-as-promised": "7.1.1",
"csvtojson": "2.0.8",
"eslint": "5.12.1",
"eslint": "^6.1.0",
"eslint-config-airbnb": "^18.0.1",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-mocha": "5.2.0",
"eslint-plugin-react": "^7.14.3",
"eslint-plugin-react-hooks": "^1.7.0",
"husky": "1.3.1",
"mocha": "5.2.0",
"nyc": "14.1.1",
"shelljs": "0.8.3"
},
"husky": {
"hooks": {
"pre-commit": "node_modules/.bin/eslint --fix . && npm test && npm run test:integration"
"pre-commit": "npm run lint -- --fix && npm test && npm run test:integration"
}
},
"bin": {
"standardly": "./standardly"
},
"engines": {
"node": ">=10.16.0"
},
"auto": {
"plugins": [
"npm",
"released"
]
}
}

0 comments on commit 4e5f12e

Please sign in to comment.