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

Circleci project setup #716

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
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
70 changes: 70 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@

version: 2.1

defaults: &defaults
docker:
- image: cimg/node:13.8.0
working_directory: ~/project

commands:
npm_install:
description: "installs npm on a job"
steps:
- run:
name: install npm
command: npm i

jobs:
build:
<<: *defaults
steps:
- checkout
- npm_install
- save_cache:
key: 'npm-packages'
paths:
- /src/tools
- run:
name: install npm lint
command: npm run lint

test:
<<: *defaults
steps:
- checkout
- restore_cache:
keys:
- 'npm-packages'
- npm_install
- run:
name: test
command: npm run test

analyze:
<<: *defaults
steps:
- checkout
- restore_cache:
keys:
- 'npm-packages'
- npm_install
- run:
name: analyze
command: npm audit
- run:
name: Failed Tests
command: echo you failed bro
when: on_fail



workflows:
react-slingshot-workflow:
jobs:
- build
- test:
requires:
- build
- analyze:
requires:
- test
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
I added a circle-ci CI Pipeline with build, test and analyze jobs.

<p align="center">
<img src="https://cloud.githubusercontent.com/assets/3129129/22811426/bb69dc06-ef0c-11e6-8092-a0bea9060b35.png"/>
</p>



---

[![Build status: Linux](https://img.shields.io/travis/coryhouse/react-slingshot.svg?style=flat-square)](https://travis-ci.org/coryhouse/react-slingshot)
Expand Down