Skip to content

Merge pull request #423 from rubynor/fix/remove-codeclimate #1039

Merge pull request #423 from rubynor/fix/remove-codeclimate

Merge pull request #423 from rubynor/fix/remove-codeclimate #1039

Workflow file for this run

name: "Ruby on Rails CI"
on: [push]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:11-alpine
ports:
- "5432:5432"
env:
POSTGRES_DB: rails_test
POSTGRES_USER: rails
POSTGRES_PASSWORD: password
redis:
image: redis
ports:
- "6379:6379"
env:
RAILS_ENV: test
DATABASE_URL: "postgres://rails:password@localhost:5432/rails_test"
REDIS_URL: "redis://localhost:6379/0"
strategy:
matrix:
node: ['21.5.x']
ruby: ['3.2.2']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Precompile assets
run: bin/rake assets:precompile
- name: Set up database schema
run: bin/rails db:schema:load
- name: Run tests
run: bin/rails test
lint:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ['3.2.2']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Lint Ruby files
run: bin/rubocop --parallel
secret_scanning:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Secret Scanning
uses: trufflesecurity/trufflehog@main
with:
extra_args: --results=verified,unknown