Skip to content

Commit

Permalink
Fix tests errors
Browse files Browse the repository at this point in the history
  • Loading branch information
malparty committed Jun 2, 2023
1 parent 1f1a694 commit 9f69741
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .template/addons/docker/Dockerfile.tt
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ RUN cp .env.example .env

# Compile assets
RUN bin/rails assets:precompile
RUN yarn postcss
RUN bundle exec rake i18n:js:export
RUN yarn build
RUN yarn build:css

<%- end -%>
EXPOSE $PORT
Expand Down
2 changes: 2 additions & 0 deletions .template/variants/web/package.json.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
# TODO: Check again after removing Webpacker, need to use version 8
# https://github.com/bjankord/stylelint-config-sass-guidelines/issues/203#issuecomment-955620774
run 'yarn add --dev [email protected]'
run 'yarn add --dev [email protected]'
run 'yarn add --dev [email protected]'

# Setup scripts
run 'npm set-script eslint "eslint . --color"'
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,19 @@ create_api:

build:
cd $(APP_NAME) && \
cp .env.example .env && \
bin/docker-prepare && \
docker-compose -f docker-compose.test.yml build

build_production:
cd $(APP_NAME) && \
cp .env.example .env && \
bin/docker-prepare && \
docker-compose build

test_variant_app:
cd $(APP_NAME) && \
cp .env.example .env && \
docker-compose -f docker-compose.test.yml run test

base_addon_spec = spec/addons/base/**/*_spec.rb
Expand All @@ -44,6 +47,7 @@ test_template:
docker-compose -f docker-compose.test.yml run test bash -c "./bin/inject_port_into_nginx.sh && nginx -c /etc/nginx/conf.d/default.conf -t" && \
docker-compose -f docker-compose.test.yml run --detach test bin/start.sh && \
cd ../.template && \
cp .env.example .env && \
bundle install; \
if [ $(VARIANT) = web ]; then \
bundle exec rspec --pattern="${base_spec}, ${web_spec}, ${base_addon_spec}, ${web_addon_spec}" --format progress; \
Expand Down

0 comments on commit 9f69741

Please sign in to comment.