diff --git a/Makefile b/Makefile index 7c451433afc..c5c7599279a 100644 --- a/Makefile +++ b/Makefile @@ -99,11 +99,11 @@ public/packs/manifest.json: yarn.lock $(shell find app/javascript -type f) ## Bu test: export RAILS_ENV := test test: $(CONFIG) ## Runs RSpec and yarn tests in parallel - bundle exec rake parallel:spec && yarn test + bundle exec rake parallel:spec && yarn build && yarn test test_serial: export RAILS_ENV := test test_serial: $(CONFIG) ## Runs RSpec and yarn tests serially - bundle exec rake spec && yarn test + bundle exec rake spec && yarn build && yarn test fast_test: export RAILS_ENV := test fast_test: ## Abbreviated test run, runs RSpec tests without accessibility specs diff --git a/README.md b/README.md index 935b21f3c24..c7c28948dd2 100644 --- a/README.md +++ b/README.md @@ -31,8 +31,12 @@ We recommend using [Homebrew](https://brew.sh/), [rbenv](https://github.com/rben -- (to install Node.js v.14 using brew: `brew install node@14`) - [Yarn](https://yarnpkg.com/en/) - [chromedriver](https://formulae.brew.sh/cask/chromedriver) + +2. You will need to install openssl version 1.1: + +- Run `brew install openssl@1.1` -2. Test that you have Postgres and Redis running. +3. Test that you have Postgres and Redis running. For example, if you've installed with Homebrew, you can start the services like this: @@ -46,13 +50,6 @@ We recommend using [Homebrew](https://brew.sh/), [rbenv](https://github.com/rben $ brew services list ``` -3. Create the development and test databases: - - ``` - $ psql -c "CREATE DATABASE identity_idp_development;" - $ psql -c "CREATE DATABASE identity_idp_test;" - ``` - 4. Run the following command to set up your local environment: ``` @@ -62,6 +59,8 @@ We recommend using [Homebrew](https://brew.sh/), [rbenv](https://github.com/rben This command copies sample configuration files, installs required gems and sets up the database. Check out our Makefile commands to learn more about what this command does: https://github.com/18F/identity-idp/blob/main/Makefile + Note: If you didn't explicitly install `openssl@1.1` in Step 2 above and you use a M1 Mac, you may see an error on this step. Homebrew works differently on a M1 Mac, so specifying the version is necessary for the make script to work, but may still work on x86. + 5. Now that you have you have everything installed, you can run the following command to start your local server: ``` diff --git a/bin/setup b/bin/setup index e28e6ac8ed6..b464d38495f 100755 --- a/bin/setup +++ b/bin/setup @@ -56,7 +56,7 @@ Dir.chdir APP_ROOT do run "bundle check || bundle install --without deploy production" run "yarn install" run "gem install thin -v 1.5.1 -- --with-cflags=\"-Wno-error=implicit-function-declaration\"" - run "gem install mailcatcher -- --with-cppflags=-I/usr/local/opt/openssl/include" + run "gem install mailcatcher -- --with-cppflags=-I$(brew --prefix openssl@1.1)/include" puts "\n== Preparing database ==" run 'bin/rake db:create'