diff --git a/.template/addons/github/.github/workflows/deploy_heroku.yml.tt b/.template/addons/github/.github/workflows/deploy_heroku.yml.tt index 1305247f6..fc0fcdf4c 100644 --- a/.template/addons/github/.github/workflows/deploy_heroku.yml.tt +++ b/.template/addons/github/.github/workflows/deploy_heroku.yml.tt @@ -5,9 +5,8 @@ on: workflows: - Test branches: - - master - main - - development + - develop types: - completed workflow_dispatch: diff --git a/.template/addons/github/.github/workflows/test.yml.tt b/.template/addons/github/.github/workflows/test.yml.tt index 84e462d49..9f842d946 100644 --- a/.template/addons/github/.github/workflows/test.yml.tt +++ b/.template/addons/github/.github/workflows/test.yml.tt @@ -13,7 +13,9 @@ env: DOCKER_REGISTRY_USERNAME: ${{ github.repository_owner }} DOCKER_REGISTRY_TOKEN: ${{ secrets.DOCKER_REGISTRY_TOKEN }} DOCKER_IMAGE: ${{ github.repository }} + <%- if WEB_VARIANT -%> NODE_VERSION: 16 + <%- end -%> # Set the default docker-compose file COMPOSE_FILE: docker-compose.test.yml @@ -106,6 +108,7 @@ jobs: name: coverage path: coverage + <%- if WEB_VARIANT -%> system_tests: name: System tests runs-on: ubuntu-latest @@ -139,6 +142,7 @@ jobs: name: system_tests_screenshots path: tmp/screenshots/ + <%- end -%> automated_code_review: name: Run Danger needs: unit_tests @@ -164,6 +168,7 @@ jobs: with: bundler-cache: true + <%- if WEB_VARIANT -%> - name: Setup Node uses: actions/setup-node@v3 with: @@ -183,6 +188,7 @@ jobs: if: steps.node-modules-cache.outputs.cache-hit != 'true' run: yarn + <%- end -%> - name: Run Undercover run: bundle exec undercover-report diff --git a/.template/addons/github/.github/workflows/test_production_build.yml.tt b/.template/addons/github/.github/workflows/test_production_build.yml.tt index 33bb02990..6887a4cb2 100644 --- a/.template/addons/github/.github/workflows/test_production_build.yml.tt +++ b/.template/addons/github/.github/workflows/test_production_build.yml.tt @@ -3,9 +3,8 @@ name: Test production build on: push: branches-ignore: - - master - main - - development + - develop env: DOCKER_REGISTRY_HOST: ${{ secrets.DOCKER_REGISTRY_HOST }} diff --git a/Makefile.tt b/Makefile.tt index ee8ac2014..1ea208bdc 100644 --- a/Makefile.tt +++ b/Makefile.tt @@ -14,6 +14,7 @@ env/setup: env/teardown: # this command will delete data ./bin/envteardown.sh +<%- if WEB_VARIANT -%> install-dependencies: bundle install yarn install @@ -25,3 +26,13 @@ codebase: codebase/fix: rubocop -a yarn codebase:fix +<%- else -%> +install-dependencies: + bundle install + +codebase: + rubocop + +codebase/fix: + rubocop -a +<%- end -%> diff --git a/bin/template.rb b/bin/template.rb index 7298e4ae3..3f15b34b4 100644 --- a/bin/template.rb +++ b/bin/template.rb @@ -6,4 +6,7 @@ copy_file 'bin/test.sh', mode: :preserve copy_file 'bin/worker.sh', mode: :preserve copy_file 'bin/docker-prepare', mode: :preserve + +if WEB_VARIANT copy_file 'bin/docker-assets-precompile', mode: :preserve +end diff --git a/config/application.yml.tt b/config/application.yml.tt index cdc239635..e80ee9a55 100644 --- a/config/application.yml.tt +++ b/config/application.yml.tt @@ -18,8 +18,13 @@ test: <<: *default TEST_RETRY: "0" +<%- if WEB_VARIANT -%> # Set environment variables required in the initializers in order to precompile the assets. # Because it initializes the app, so all variables need to exist in the Docker build stage (used in bin/docker-assets-precompile). docker_build: <<: *default SECRET_KEY_BASE: dummy_secret_key_base +<%- else -%> +docker_build: + <<: *default +<%- end -%>