This repo hosts the code for my personal developer site. This is always a constant work in progress.
- Clone repo.
- Install firebase tools
npm install -g firebase-tools
- Run
npm install
in root project directory. - Run
npm run dev
. - If everything went well, you should be able to open
http://localhost:3000
in your browser and see the site.
Do the following before creating a pull request.
- If you're going to make a change, write at least one test for your change.
- Run
npm run lint
and fix any errors - Run
npm run test
and fix any errors
- To run all the tests for react components, run
npm run test
- To run tests on a specific component, run
npm run test componentName
- To run e2e tests, run
npm run test:e2e
. Local server must be running. See below for more information.
- To test locally, run
npm run test:e2e
. These will run on your running local server. - These are true end to end tests, they should cover a very basic user path.
- If you think a test belongs in a component or unit test, then it probably does. These e2e should be used sparingly.
- Each pull request will trigger an end to end test on the PR. This test will run on the PR's preview URL.
- The test will check to ensure all pages are loading correctly.
- These are ephemeral environments generated in Firebase and will be deleted after the PR is closed.
- If the test fails:
- Check the logs in the PR to see what failed.
- If the test failed due to a bug in the code, fix the bug and push the changes to the PR.
- Github might be down. These are true e2e tests and rely on Github to be up and running.
- In your terminal login to Firebase
- Enter
firebase login
- Enter
- After logging in, create a ci token
firebase login:ci
- A browser will open, prompting you to login.
- After logging in, go back to the terminal and copy the FIREBASE_TOKEN listed.