Skip to content

Latest commit

 

History

History
67 lines (44 loc) · 1.21 KB

README.md

File metadata and controls

67 lines (44 loc) · 1.21 KB

Repo that is used by the Office Team to do job interviews.

In this assignment we are going to:

  • Read a CSV file
  • Publish the listings to Google PubSub
  • Read from PubSub and write the data to Firestore

The code is already implemented, but it could be improved in a number of ways...

Overview

Installation

First make sure to install Docker. Then, to install everything:

make install

This will build a php container, a Firestore emulator, and a PubSub emulator.

Usage

The application consists of 3 commands. You can run them inside the php container:

make up
docker compose run --rm php sh

(This will automatically start the PubSub and Firestore emulator)

Commands

Step 1: import data from the CSV file:

bin/console listings:import

Step 2: process the imported data (from PubSub):

bin/console listings:process

Step 3: show the processed data (from Firestore):

bin/console listings:show

You can also run all steps sequentially:

make run

Testing

To run the tests:

make test