8000 Migrate to Docker Compose V2 by unchidev · Pull Request #136 · koedame/rails-mermaid_erd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Migrate to Docker Compose V2 #136

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

Merged
merged 7 commits into from
Dec 23, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 0 additions & 52 deletions .devcontainer/devcontainer.json

This file was deleted.

38 changes: 0 additions & 38 deletions .devcontainer/docker-compose.yml

This file was deleted.

44 changes: 22 additions & 22 deletions .github/workflows/coding-style-check.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
name: Coding Style Check
name: coding-style-check

on:
pull_request:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop

jobs:
coding-style-check:
standardrb:
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Restore Cache
uses: actions/cache@v4
id: bundle_cache_id
env:
cache-name: cache-bundle
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: ./vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-gem-${{ env.cache-name }}-
${{ runner.os }}-gem-
${{ runner.os }}-
${{ runner.os }}-buildx-

- name: Install Packages
shell: bash
- name: Install dependencies
run: |
docker compose -f docker-compose.ci.yml run --rm app bundle install --jobs=16
docker compose -f docker-compose.ci.yml run --rm app bundle clean --force
docker compose -f compose.ci.yml run --rm app bundle install --jobs=16
docker compose -f compose.ci.yml run --rm app bundle clean --force

- name: Run Linter
run: docker compose -f docker-compose.ci.yml run --rm app bundle exec standardrb
- name: Run standardrb
run: docker compose -f compose.ci.yml run --rm app bundle exec standardrb
58 changes: 29 additions & 29 deletions .github/workflows/run-test.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
name: Run Test
name: test

on:
pull_request:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop

jobs:
run-test:
test:
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Restore Cache
uses: actions/cache@v4
id: bundle_cache_id
env:
cache-name: cache-bundle
- uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Cache Docker layers
uses: actions/cache@v3
with:
path: ./vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-gem-${{ env.cache-name }}-
${{ runner.os }}-gem-
${{ runner.os }}-
${{ runner.os }}-buildx-

- name: Up Docker Container
run: docker compose -f docker-compose.ci.yml up -d
- name: Start containers
run: docker compose -f compose.ci.yml up -d

- name: Install Packages
shell: bash
- name: Install dependencies
run: |
docker compose -f docker-compose.ci.yml exec app bundle install --jobs=16
docker compose -f docker-compose.ci.yml exec app bundle clean --force
docker compose -f compose.ci.yml exec app bundle install --jobs=16
docker compose -f compose.ci.yml exec app bundle clean --force

- name: Setup DB
- name: Setup database
run: |
docker compose -f docker-compose.ci.yml exec app sh -c "cd ./spec/dummy && bundle exec rails db:setup"
docker compose -f compose.ci.yml exec app sh -c "cd ./spec/dummy && bundle exec rails db:setup"

- name: Run Test
run: docker compose -f docker-compose.ci.yml exec app bundle exec rspec
- name: Run tests
run: docker compose -f compose.ci.yml exec app bundle exec rspec

- name: Down Docker Container
run: docker compose -f docker-compose.ci.yml down
- name: Stop containers
run: docker compose -f compose.ci.yml down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ gemspec
gem "bump"
gem "rake"
gem "solargraph"
gem "nio4r", "~> 2.7.0"
3 changes: 2 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ GEM
timeout
net-smtp (0.5.0)
net-protocol
nio4r (2.5.8)
nio4r (2.7.4)
nokogiri (1.16.7-aarch64-linux)
racc (~> 1.4)
nokogiri (1.16.7-arm64-darwin)
Expand Down Expand Up @@ -290,6 +290,7 @@ PLATFORMS

DEPENDENCIES
bump
nio4r (~> 2.7.0)
pg
rails-mermaid_erd!
rake
Expand Down
File renamed without changes.
7 changes: 7 additions & 0 deletions docker-compose.yml → compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ services:
volumes:
- .:/workspace
- bundle_data:/usr/local/bundle
command: /bin/sh
tty: true
environment:
POSTGRES_HOST: db
POSTGRES_USER: test
POSTGRES_PASSWORD: test
RAILS_ENV: test

db:
container_name: rails-mermaid-erd-db
Expand Down
Loading
Loading
0