Skip to content

Merge pull request #114 from motohiro-mm/feature/add_css #63

Merge pull request #114 from motohiro-mm/feature/add_css

Merge pull request #114 from motohiro-mm/feature/add_css #63

Workflow file for this run

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