Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add name to DevContainer compose file #51791

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/devcontainer-smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ jobs:
- name: Generate rails app sqlite3
run: bundle exec railties/exe/rails new myapp_sqlite --database="sqlite3" --dev

- name: Remove old deprecated docker-compose
run: |
sudo rm /usr/local/bin/docker-compose
Comment on lines +36 to +38
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed the old and deprecated docker-compose 1.29.1 (from may 10, 2021), so it uses the compose v2 https://docs.docker.com/compose/migrate/


- name: Test devcontainer sqlite3
uses: devcontainers/ci@v0.3
with:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: "<%= app_name %>"

services:
rails-app:
build:
Expand Down
2 changes: 2 additions & 0 deletions railties/test/generators/app_generator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1295,6 +1295,8 @@ def test_devcontainer
assert_match(/ARG RUBY_VERSION=#{RUBY_VERSION}/, content)
end
assert_compose_file do |compose_config|
assert_equal "my_app", compose_config["name"]

expected_rails_app_config = {
"build" => {
"context" => "..",
Expand Down