This repository has been archived by the owner on Mar 9, 2022. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A lot of things have happened.
Regarding...
yarn.lock
:yarn install
yarn remove puppeteer jest-puppeteer
docs.test.js
:other files:
docker-compose
manages multiple images.Makefile
gives easy access to docker commands.SETUP_TYPE=manual|docker
to.env.sample
file. This is being used insidepreCommit.sh
file while runningpre-commit
hook..prettierignore
file to keepMakefile
format intact.docker-compose-test.yml
is an optional file, which can be used to run tests inside new docker meant to run tests. However, I am using the same(dev) container for tests during thepre-commit
hook.How it all works:
make setup
command inside the project directory.make start
. This runs docker containers in the background and they can consume APIs athttp://localhost
(at default, port 80).sh preCommit.sh
, which checks whether the setup ismanual
ordocker
and based on that, it runs tests accordingly.preCommit.sh
file, I am not using&&
to run all commands in one line because I kept getting the error:stdin is not a tty
. but spreading across multiple lines 'fixed' it.Only downside to this whole setup is, users on windows with "regular" setup of this project, using GitBash cannot run
git commit
directly. but they would have to prependwinpty
.Example:
winpty git commit -m "Commit message"
. This is a limitation with winpty and not the setup itself. but if they use Powershell, it works all OK. And docker setup works fine on both Gitbash and Powershell.This setup needs to be rigorously tested, yet(I've done my best but..). On different machines. Please help me do that!!! As far as the setup itself, it's functional but few things can be modified and I'd love to have suggestions.