提案やコメントがない時にメッセージを表示するようにした #104
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
name: CI | |
on: | |
pull_request: | |
branches: [main] | |
push: | |
branches: [main] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:16.4-alpine | |
ports: | |
- "5432:5432" | |
env: | |
POSTGRES_DB: rails_test | |
POSTGRES_USER: rails | |
POSTGRES_PASSWORD: password | |
env: | |
RAILS_ENV: test | |
DATABASE_URL: "postgres://rails:password@localhost:5432/rails_test" | |
RAILS_MASTER_KEY: ${{ secrets.GOHAN_MASTER_KEY }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Ruby and gems | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Set up database schema | |
run: bin/rails db:schema:load | |
- name: Assets precompile | |
run: bundle exec rake assets:precompile | |
- name: Run tests | |
run: bundle exec rspec | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Ruby and gems | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Install dependencies | |
run: npm install | |
- name: Security audit application code | |
run: bin/brakeman -q -w2 | |
- name: Rubocop | |
run: bundle exec rubocop | |
- name: ERBLint | |
run: bundle exec erblint --lint-all | |
- name: ESLint and Prettier | |
run: npm run -s lint |