Skip to content

omarnyte/reddit-pics-browser

Repository files navigation

CI/CD codecov

Reddit r/Pics Browser

This single-page React web app allows for navigation of the r/pics subreddit.

Local Development

Requirements

Setup

  1. Clone the repo

  2. Install dependencies

    npm install

  3. Start the app on default port 3000

    npm start

Testing

Tests are written using Jest and React Testing Library. API calls are mocked using the Mock Service Worker library.

  • To run tests in watch mode:

    npm test

  • To run tests in watch mode with coverage:

    npm test -- --coverage

CI/CD

This project uses Github Actions for CI/CD. The worfklow will:

  • run all tests
  • send coverage metrics to Codecov
  • build the app

Contributing

  1. Fork and clone the repo.
  2. Follow the setup steps outlined above.
  3. Make your changes, ensuring that code coverage remains at 100%.
  4. Open a pull request documenting your changes. Please ensure that that GitHub Actions workflow suceeds.

Deployment

This repo's main branch automatically deploys to Heroku after the GitHub Actions workflow succeeds.