Skip to content

Commit

Permalink
[#348] chore: Remove test related make commands
Browse files Browse the repository at this point in the history
  • Loading branch information
tyrro committed Apr 11, 2023
1 parent c4aeed2 commit 7da2972
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 18 deletions.
1 change: 0 additions & 1 deletion .template/addons/docker/.env.tt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ BRANCH_TAG=latest
PORT=80
CI=false
TEST_RETRY=0
DATABASE_URL=postgres://postgres:[email protected]:5432/<%= APP_NAME %>_development?sslmode=disable
15 changes: 1 addition & 14 deletions Makefile.tt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include .env

.PHONY: dev env/setup env/teardown test test/docker codebase codebase/fix
.PHONY: dev env/setup env/teardown codebase codebase/fix

dev:
make install-dependencies
Expand All @@ -18,19 +18,6 @@ install-dependencies:
bundle install
yarn install

test:
docker-compose -f docker-compose.test.yml --project-name <%= APP_NAME %>_test up -d db redis
bundle exec rspec $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
docker-compose -f docker-compose.test.yml --project-name <%= APP_NAME %>_test down

test/docker:
./bin/docker-prepare
docker-compose -f docker-compose.test.yml build
docker-compose -f docker-compose.test.yml run test make install-dependencies
docker-compose -f docker-compose.test.yml run test bin/bundle exec rake db:test:prepare
docker-compose -f docker-compose.test.yml run test
docker-compose -f docker-compose.test.yml down

codebase:
rubocop
yarn codebase
Expand Down
6 changes: 3 additions & 3 deletions README.md.tt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Add the following build settings to run the tests in the Docker environment via
```sh
# a unique `BRANCH_TAG` value to tag the Docker image
# e.g $SEMAPHORE_BRANCH_ID or using the
# or using nimblehq/branch-tag-action@v1 Github action
# or using nimblehq/branch-tag-action@1 Github action
export BRANCH_TAG= # unique value for tagging Docker image
```

Expand Down Expand Up @@ -88,7 +88,7 @@ Upon the first build, the whole Docker image is built from the ground up and tag
docker compose -f docker-compose.test.yml run test

# Non-Docker way
make test
rspec
```

- Run a specific test:
Expand All @@ -98,7 +98,7 @@ Upon the first build, the whole Docker image is built from the ground up and tag
docker compose -f docker-compose.test.yml run test bin/bundle exec rspec [rspec-params]

# Non-Docker way
make test [rspec-params]
rspec [rspec-params]
```

### Linting
Expand Down

0 comments on commit 7da2972

Please sign in to comment.