- Install Docker Desktop
- Setup
development-stack
andhasura-console
repos locally - Setup Doppler using the doppler setup document
- Run
yarn install
- Run the reset script to setup all local Docker infra:
./scripts/reset-vault-gui-completely-including-data
OR run the container with./scripts/dc-start-vault-gui
- Visit localhost:5000
# Lint
yarn run lint
# Prettier (detect)
yarn run prettier
# Prettier (fix)
yarn run prettier:write
# Cypress (windowed)
yarn run e2e
# Cypress (headless)
yarn run e2e:headless
# Jest (unit)
yarn run test
If your local environment is not working as expected, the first thing you should try is clearing all the cached data.
-
Clear the cookies for the page.
- Click on the (i) to the left of the url.
- Click on "Cookies".
- Click "Remove".
- Click done.
-
Clear local storage.
- Open chrome dev tools.
- Click "Application".
- Click the arrow to the left of the "Local Storage" field.
- Right click on the URL of the site and click "Clear".
-
Clear IndexedDB.
- Open chrome dev tools.
- Click "Application".
- Click the arrow to the left of the "IndexedDB" field.
- Click the arrow to the left of all the sub-entries.
- Right click on each entry and click "Clear".
-
Hard refresh the page.
- Right-click (or click-and-hold) the refresh button.
- Click "Empty Cache and Hard Reload".
- NextJS:
12.2.x
- React:
18.2.x
This allows us to write e2e tests quickly and with joy. It has lots of stuff out of the box and allows real-user-like testing
Quite simply jest is a unit-tester that has lots of support and is the #1
app used by most large companies. It also has 1st class integration with
nextjs
so this was an easy choice.
We are currently using github actions to check our code before it's deployed to our various vercel envs
These "actions" are also run locally as pre-commit checks w/
Husky
- ESLint
- Prettier
- Cypress
- We create 3 tester instances to spread out the tests for faster full-test-suite runs as we can now parallelize out test suite!!!
- Jest
We use codacy/git-version@2.2.0
to create tags for every "deployed"
branch (i.e. development, staging, production
) automatically
This allows use to save the exact state that a env is in and easily can check if the same version is deployed everywhere
👋 Please "tag" your commits correctly in order for versions to be properly incremented (read below)
The tagging system follows the semvar standard:
MAJOR.MINOR.PATCH
In short
MAJOR
version when you make incompatible API changes,MINOR
version when you add functionality in a backwards compatible manner, andPATCH
version when you make backwards compatible bug fixes.
If your commits contain NO keywords then a PATCH
version will be applied
However, if you do want to increment more use the following:
feature: xxxx
:MINOR
breaking: xxx
:MAJOR
In case you want more clarification, here are some real examples, assuming we
are starting with v1.2.0
PATCH
commit AE23F2D
- "Changed the blue to be more blue"
commit DD85FAC
- "Fixed spacing between letters"
commit 3A6D13E
- "Added Copy"
// Version is now v1.2.1
MINOR
commit AE23F2D
- "feature: added a whole new button". <<<<<<<<< look at the prefix here
commit DD85FAC
- "some stupid fix"
commit 3A6D13E
- "another driveby change"
// Version is now v1.3.0
MAJOR
commit AE23F2D
- "feature: added a whole new button". <<<<<<<<< look at the "smaller" prefix here
commit DD85FAC
- "some stupid fix"
commit 3A6D13E
- "breaking: every api call requires a pizzaID number" <<< and look here
// Version is now v2.0.0
// This one is tricky b/c it contains "two" keywords.
// Our system just picks the LARGEST keyword