CI/CD with React

Abdullah Waqas
Jan 6 · 6 min read
Image for post
Image for post

What is CI/CD?

A beginner's guide to CI/CD for React?

Prerequisites

What we will cover?

Scenario

Clone Github Repository

Image for post
Image for post
yarn test
Image for post
Image for post

Setting Up CI With CircleCI

Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post

Setup Codecov

"test:coverage": "cross-env CI=true npm test -- --env=jsdom --coverage",
"upload:test-report": "./node_modules/.bin/codecov",
codecov: codecov/codecov@1.0.2
- codecov/upload:   file: './coverage/clover.xml'
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post

Setup Deployment on Netlify

yarn add netlify-cli
"netlify:deploy": "netlify deploy --dir=./build -p -m \"$(git log -1 --pretty=%B)\""
- run: npm run netlify:deploy
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post

Frontend Weekly

It's really hard to keep up with all the front-end…

Abdullah Waqas

Written by

Software Developer(React, Angular, Node)

Frontend Weekly

It's really hard to keep up with all the front-end development news out there. Let us help you. We hand-pick interesting articles related to front-end development. You can also subscribe to our weekly newsletter at http://frontendweekly.co

Abdullah Waqas

Written by

Software Developer(React, Angular, Node)

Frontend Weekly

It's really hard to keep up with all the front-end development news out there. Let us help you. We hand-pick interesting articles related to front-end development. You can also subscribe to our weekly newsletter at http://frontendweekly.co

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store