-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from koedame/feature/setup-ci
Setup CI for coding style check
- Loading branch information
Showing
4 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Coding Style Check | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- develop | ||
- main | ||
|
||
jobs: | ||
coding-style-check: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Restore Cache | ||
uses: actions/cache@v3 | ||
id: bundle_cache_id | ||
env: | ||
cache-name: cache-bundle | ||
with: | ||
path: ./vendor/bundle | ||
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-gem-${{ env.cache-name }}- | ||
${{ runner.os }}-gem- | ||
${{ runner.os }}- | ||
- name: Install Packages | ||
shell: bash | ||
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 | ||
- name: Run Linter | ||
run: docker compose -f docker-compose.ci.yml run --rm app bundle exec standardrb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,4 @@ test/dummy/log/*.log | |
test/dummy/tmp/ | ||
test/reports | ||
tmp | ||
vendor/bundle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM ruby:alpine | ||
|
||
ENV APP /app | ||
|
||
WORKDIR $APP | ||
|
||
RUN apk add --no-cache alpine-sdk git | ||
|
||
RUN bundle config set path 'vendor/bundle' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
services: | ||
app: | ||
container_name: app-rails-mermaid-erd | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.ci | ||
volumes: | ||
- .:/app | ||
- ./vendor/bundle:/usr/local/bundle |